Hello Ken,
If so, I think we need to develop a program/function to streamly read XML
data byte by byte and then extract out invalid characters. After that, we
could save it back to file. Then it could be opened by LoadXML.
Hope that helps.
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
!Content-Class: urn:content-classes:message
!From: "Ken" <
[email protected]>
!Sender: "Ken" <
[email protected]>
!References: <
[email protected]>
!Subject: LoadXml() problem - invalid characters
!Date: Thu, 4 Sep 2003 06:02:31 -0700
!Lines: 20
!Message-ID: <
[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: quoted-printable
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNy5MzlUTeV0zt2QxK5k8jtzPQbyg==
!Newsgroups: microsoft.public.dotnet.framework
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:52952
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.framework
!
!Thanks very much for the help - all of you!
!I don't actually need to represent these characters. I
!think they are superfluous and sneaking into the document
!and I need to filter them out so I can load the document
!into the DOM.
!>-----Original Message-----
!>When calling LoadXml(), I get an exception with the
!>message, "'', hexadecimal value 0x1B, is an invalid
!>character. Line 4, position 245." Apparently my Xml
!>document has an invalid character in it. I can write code
!>to strip it out, but my question is what characters
!>are "valid" in an Xml document?
!>
!>I have seen the above error for 0x1B and 0x0F, so I know
!>there are at least two invalid characters. Are there
!>others?
!>.
!>
!