[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Illegal xml chars

Subject: Re: Illegal xml chars
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 13 Dec 2007 16:04:36 +0100
Re:  Illegal xml chars
Waqar Ali wrote:

I have an illegal character in my xml (0x08 or &#x8;) and when I tries to transform it using xslt, the parser (MS .NET) gives me an error(hexadecimal value 0x08, is an invalid character). I tried everything: using different encoding, wrapping my xml data in CDATA tags but nothing seems
to be working. What do you suggest?

If you are using .NET 2.0 or later then you can use &#x8; (a character reference) in your XML 1.0 documents parsed by an XmlReader with XmlReaderSettings.CheckCharacters set to false e.g. C#
XmlReaderSettings readerSettings = new XmlReaderSettings();
readerSettings.CheckCharacters = false;
using (XmlReader reader = XmlReader.Create(@"file.xml", readerSettings))
{
// now use that reader here e.g. to be on topic on the list
XPathDocument doc = new XPathDocument(reader);
// ...
}


Using the character literally however is not possible.

If you need more help on that then I suggest we move to the newsgroup microsoft.public.dotnet.xml as we are getting off-topic here on the XSL list.

--

	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.