msxml

XML parser error

Hi, I've an xml file of size 83,383 KB on a windows server.I load this file using MS xml parser and it works fine. When I copy this file to another windows server, the size of file becomes 83,392 KB.When i load this file using MS xml parser, I get xml parser error message: "Data at the root level is invalid. Line 1116371, position 8." ...

Interop.MSXML2 throwing exceptions because its not registered BUT IT WONT REGISTER!

Ok, this line of code: XMLHTTP40 http = new XMLHTTP40(); Throws a System.Runtime.InteropServices.COMException and complains that: Retrieving the COM class factory for component with CLSID {88D969C5-F192-11D4-A65F-0040963251E5} failed due to the following error: 80040154. I have googled that and I guess the DLL needs to be regist...

Fast clear MSXML Document or Re-create?

Is there a fast way to clear the previous content of an MSXML2.DOMDocument object prior to reuse? I've been in the habit of discarding them and creating a fresh instance each time but this strikes me as wasteful and profiling a few test cases seems to confirm this. I'm sticking with MSXML 3.0 in this case for portability, and I realize...

Please guide me to set an attribute in XML node usig MSXML. I am struck.

I try to set an attribute in a XML node using MSXML. IXMLDOMElement alone has the member function setatrribute. So i got the document element. pXMLDocumentElement->get_documentElement(&pElement); pElement->selectSingleNode(nodePathString,&pNode); . . . pElement->setAttribute(bstr,var); I selected the required node inwhich the attrib...

set an attribute in XML node usig MSXML. I am struck

I try to set an attribute in a XML node using MSXML. IXMLDOMElement alone has the member function setatrribute. So i got the document element. pXMLDocumentElement -> get_documentElement (& pElement ); pElement -> selectSingleNode ( nodePathString ,& pNode ); . . . pElement -> setAttribute ( bstr , var ); I selected the required node i...

msxml3.dll: The download of the specified resource has failed -When using XMLHTTP

I have a java script code snippet where i am making an XMLHTTP request to a remote server page. The below is my code var objXMLdom = new ActiveXObject("Microsoft.XmlDOM") var objXMLRecdom = new ActiveXObject("Microsoft.XmlDOM") objXMLdom.async = false var objXMLRoot = objXMLdom.createElement("root"); objXMLdom.doc...

RegEnumkeyEx for xml

<computer> <Keyboard/> <Mouse/> <HardDisk/> </computer> Here ,Assume xml as a registry ,computer is a registry key ,and it have keyboard,mouse,harddisk ,these are subkeys to computer..now can u help me ,how can enumerate a subkey from xml using MSXML and registry function...Thanks in advance. ...

Parsing UTF-8-encoded XML in MSXML/ASP

I'm at the receiving end of a HTTP POST (x-www-form-urlencoded), where one of the fields contains an XML document. I need to receive that document, look at a couple of elements, and store it in a database (for later use). The document is in UTF-8 format (and has the appropriate header), and can contain lots of strange characters. When I...

msxml fails to correctly close <link> tags during XSLT transformation

Hi, I'm trying to parse a RSS feed using C#, and I need to transform it with XSLT. Here's a snippet of my XSLT: <xsl:output encoding="UTF-8" method="html" omit-xml-declaration="yes"/> <xsl:template match="/"> <xsl:apply-templates select="rss/channel/item" /> </xsl:template> <xsl:template match="rss/channel/item"> <item> <li...

MSXML: How do ask an IXMLDOMNode what version MSXML it comes from?

How can i ask what version of MSXML an IXMLDOMDocument2 is? Given an IXMLDOMDocument2 i need to create another document of the same version. If you give an IXMLDOMDocument from different versions of MSXML, you will get an exception from msxml: It is an error to mix objects from different versions of MSXML. Microsoft internally can...

EOutOfMemory Creating Large XML Using Delphi

I'm using Delphi to create an XML document from data in a relational database. It tests fine with small datasets, but when I try to expand the size of the data set to production levels it eventually bombs out with an EOutOfMemory exception during node creation. I'm using a TXMLDocument dropped on a form (MSXML as the Vendor), and my cod...

Delphi: Invalid XML gets through MSXML validation

I've tried to revrite a JScript example at MSDN in order to validate XML against certain schemas. As a first attmempt, I've used the sl-valid.xml, sl-notValid.xml, and sl.xsd files as used in the example. My code goes as follows: procedure BasicValidation(FileName: string); var XML: IXMLDOMDocument2; begin // Load XML and resolve ...

Delphi/MSXML: XPath queries fail

I've loaded a XML document, and now I wish to run a XPath query to select a certain subset of the XML. The XML is <?xml version="1.0"?> <catalog xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'&gt; <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genr...

Is there a way to control which tags get collapsed during serialization with MSXML6?

I create a MSXML6 DOM document and during serialization I want to control how empty elements are serialized: <tag></tag> <tag/> This answer describes a solution for C#, but I'm looking for something possible with the ActiveX interface of MSXML. (For VB6 or some scripting language) ...

Validate a remote schema (http) with include schemas and specific proxy server settings

Validate a remote schema (http) with include schemas and specific proxy server settings I can access the schemas on the other server via http, it resolves the include schemas (.xsd), no problem. I guess it uses the proxy server settings from Internet Explorer. However, for this to work on other machines I need to be able to specify th...

IXMLDOMDocument2 to string javascript

I have a IXMLDOMDocument2 type document. I would like to see the xml for this document. How can I turn it in to a string so I can view it? I am using javascript. The .text properity is just "". ...

MSXML2.XMLHTTP Request to validate entered URL in ASP Classic

Hi guys. Thanks in advance for any help received. I want to allow our client to enter a URL into a text field which then checks whether the URL exists and works. There are 3 possible outcomes I want to check for: A status of 200 - OK, A status of 500 - Server Error, Or a status of 404 - page not found. When executing the following cod...

Change NodeName of an XML tag element using MSXML

I'd like to change the tag name of a MSXML XMLDOMElement, but unfortunately the nodeName property is read-only. Is there any straightforward way to do it, or have I to work around by doing some insert/replace and deep copy children? <xml> ... <oldTagName> ... sub-elements </oldTagName> <more xml> ... Should become <xml>...

Schema validation error "Duplicate named <element> : name = 'X'"

I'm trying to use the IXMLDOMDocument2 interface (C++) to validate an Xml document against some schema and I'm getting the following error: Duplicate named <element> : name = '{http://www.site.com/MySchema}envelope'. I'm struggling to understand what this means - is there a problem with my schema, or is this a problem with the Xml? I'...

Large Xml files are being truncated by MSXML4 / FreeThreadedDOMDocument40 (COM string Interop issue)

I'm using the following code to load a large Xml document (~5 MB): int _tmain(int argc, _TCHAR* argv[]) { ::CoInitialize(NULL); HRESULT hr; CComPtr< IXMLDOMDocument > spXmlDocument; hr = spXmlDocument.CoCreateInstance(__uuidof(FreeThreadedDOMDocument60)), __uuidof(FreeThreadedDOMDocument60); if(FAILED(hr)) return FALSE; spXmlDoc...