msxml

Writing XML strips trailing spaces

I am trying to write an XML file using MSXML4. It works fine except when I have a data element with a trailing space which must be preserved. Given the following code to insert a new element: const _bstr_t k_Parent (ToBSTR("ParentNode")); const _bstr_t k_Child (ToBSTR("ChildNode")); const _bstr_t k_Data (ToBSTR("Data...

Merging two XMLDOMDocuments

Hi, Is there any easy way in msxml to merge two xml documents (IXMLDomDocuments)? I want to make one of the trees embedded as a child of the second one. I saw that IXMLDomDocument3 offers importNode, but couldn't get it to work correctly. Is this the way to go or is there another solution? Thanks, Dan ...

VC++ project: MSXML vs any other XML libraries

We are aware of MSXML, based on COM technologies. We want to use it for a VC++ project starting soon. Are there any other XML libraries do good compared to MSXML? ...

How do acquire a xml string for a child using msxml4?

Using MSXML4, I am creating and saving an xml file: MSXML2::IXMLDOMDocument2Ptr m_pXmlDoc; //add some elements with data SaveToDisk(static_cast<std::string>(m_pXmlDoc->xml)); I now need to acquire a substring from m_pXmlDoc->xml and save it. For example, if the full xml is: <data> <child1> <A>data</A> <One>da...

how to get namespace prefixes from XML document, using MSXML ?

For example, In this document < ?xml version="1.0" ? > < SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://opcfoundation...

msxml XMLHTTPRequest and timeout

Hi, what determins the timeout value for XMLHTTPRequest (msxml version) send method? I'm calling it from MS Sql server and the server profiler shows me 'completed' after 30 seconds, the same happens when calling it through client programm calling stored proc. I set the client connection timeout to 120 sec. So im thinking it must be msxm...

XSLT big integer (int64) handling msxml

When trying to do math on an big integer (int64) large number in xslt template I get the wrong result since there is no native 64-bit integer support in xslt (xslt number is 64-bit double). I am using msxml 6.0 on Windows XP SP3. Are there any work around for this on Windows? <tables> <table> <table_schem>REPADMIN</table_schem> ...

Javascript Msxml2.XMLHTTP terminal server access denied

Hi, var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttpRequest.open("POST", "http://vat/_vti_bin/lists.asmx", false); How can I let this script work on a Terminal server? When I open it on my local pc, it works, but when I do the same thing in a browser on a Terminal server, I get Access Denied. I tried using ServerXMLH...

Problem adding namespaces to MSXML (using setProperty('SelectionNamespaces', ...))

A while back, I asked a question regarding the usage of namespaces in MSXML. At first, I circumvented the whole thing with the XPath *[local-name()]-hack (see my previous post), but having a crisis of conscience I decided to do things the right way. (Doh!) Consider the following XML: <?xml version="1.0" encoding="UTF-8"?> <Root xsi:sch...

Can you detect a 301 redirect with Microsoft.XMLHTTP object?

I'm using VBScript and the Microsoft.XMLHTTP object to scrape some web data. I have a list of URLs to check, but unfortunately some of them 301 redirect to others on the list, so I wind up with redundant data. Is it at all possible to make the XMLHTTP object fail on 301 redirect? Or at least cache the original response header? Or oth...

Saving XML in UTF-8 with MSXML

I'm trying to load a simple Xml file (encoded in UTF-8): <?xml version="1.0" encoding="UTF-8"?> <Test/> And save it with MSXML in vbscript: Set xmlDoc = CreateObject("MSXML2.DOMDocument.6.0") xmlDoc.Load("C:\test.xml") xmlDoc.Save "C:\test.xml" The problem is, MSXML saves file in ANSI instead of UTF-8 (despite the original file ...

I cannot seem to load an XML document using ASP (Classic), IIS6. Details inside.

So I am writing a web application for use within my organization. The application requires that it know who the current user is. This is done by calling the Request.ServerVariables("AUTH_USER") function, which works great as long as 'Anonymous Access' is disabled (unchecked) and 'Integrated Windows Authentication' is enabled (checked) wi...

EXSLT date:format-date template without document() XSLT 1.0

Hello guys, I'm using date:format-date template EXSLT file I'm using XSLT 1.0 and MSXML3.0 as the processor. My date:format-date template EXSLT file's declaration is: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:date="http://exslt.org/dates-and...

can i perform xml operations in XMLLITE with the same features of MSXML?

Hi , I know something about MSXML parser ,to create an xml with native code ..Msxml depends COM..So I want to create xml without com and dom ,so i wish to choose XMLLITE..but i dont know full details about xmllite ,when i was read the xmllite documentation in msdn ,i gathered some points ,they will provide only 2 things (IXMLReader & ...

MSXML problem in VC++ 6

I have this bit of code: typedef CComQIPtr<MSXML::IXMLDOMDocument2> XML_DocumentPtr; then inside some class: XML_DocumentPtr m_spDoc; then inside some function: XML_NodePtr rn=m_spDoc->GetdocumentElement(); I cannot find anywhere in the MSDN documentation what that GetDocumentElement() is supposed to do? Can anyone tell me why ...

MSXML and presentation layer

Hi, I have read that ebay uses MSXML framework for presentation layer. Can someone explain why this way is better. How they achieve performance this way? My question is why they are using MSXML? Regards ...

XSLT To HTML with Simple Grouping of XML Data using templates instead of for-each

I have been messing with xslt off and on since I became a sharepoint administrator, it uses xslt alot for displaying list data. I have recently started using it to transform database results that I have converted to xml using an extension method. I am trying to produce clean html. My first attempt, worked fine. However I used for-eac...

Xpath expression to retrieve oldest/earliest node

I have an XML snippet, so: <STATES> <STATE> <NAME>Alabama</NAME> <ABBREVIATION>AL</ABBREVIATION> <CAPITAL>Montgomery</CAPITAL> <POPULATION>4661900</POPULATION> <AREA>52419</AREA> <DATEOFSTATEHOOD>14 December 1819</DATEOFSTATEHOOD> </STATE> <STATE> <NAME>Alaska</NAME> <ABBREVIATION>AK</ABBREVIATION> ...

How to Validate an XML Node against an XSD in C++?

Hi Please note that I'm asking for validation against a particular node and not the whole file. For examples <somexmldoc> <someNode> <UserDefinedNode> </> <UserDefinedNode> </> </someNode> </somexmldoc> For this XML doc, I have an wholeDoc.XSD which could be used to validate the whole document except "UserDef...

How can be Interop of MSXML Node in C++/CLI as XMLTextWriter or related XML Usability

Hello, I have some native code which generates native XML node of MSXML. I need that root node in C++/CLI to be use as XMLTextWriter or in any form of XML in C++/CLI. Is there any interop available for MSXML Node for using in C++/CLI. Regards Usman ...