Try this:
Expand|Select|Wrap|Line Numbers
- Dim bRet As Boolean
- Dim lRet as long
- Dim xmlDoc As MSXML2.DOMDocument
- Set xmlDoc = New MSXML2.DOMDocument
- bRet = xmlDoc.Load("d:\test.xml")
- lRet = xmlDoc.parseError.filepos 'returns the position of the A9 (copyright symbol)
<NRCS_2NEWARC RECORDNUMBER= "1844">
<TreeStructure Data="19930121"/>
<![CDATA[NEWSS © 1993 All Rights Reserved ]]>
</NRCS_2NEWARC>
Which I saved as d:\test.xml. See the A9 (copyright symbol) inside the CData section - MSXML chokes on it every time - If I remove the copyright symbol everything works as expected. Why? I thought a CDATA section was supposed to be passed intact! The only thing you're not supposed to put into a CDATA section is ]]> which terminates it.
This is frustrating!
I've tried it with MSXML 4, 5, and 6.