Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - WriteString() Problem >Thread Next - Re: WriteString() Problem Re: WriteString() ProblemTo: NULL Date: 9/4/2007 9:39:00 PM "Tom Delany" <stellarguy@n...> wrote in message news:uIX8q3y7HHA.2208@T...... > According to the Microsoft documentation, the .NET class > System.Xml.XmlWriter.WriteString() does the following: > > "Character values in the range 0x-0x1F (excluding white space characters > 0x9, 0xA, and 0xD) are replaced with numeric character entities (� > through �x1F)." > > However, when we call WriteString() in an application we have written, we > are seeing the following exception being thrown: > > System.ArgumentException: '', hexadecimal value 0x12, is an invalid > character. > at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* > pDst, Boolean entitize) > at System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, > Char* pSrcEnd) > at System.Xml.XmlUtf8RawTextWriter.WriteString(String text) > at System.Xml.XmlUtf8RawTextWriterIndent.WriteString(String text) > at System.Xml.XmlWellFormedWriter.WriteString(String text) > > Anyone ever seen anything like this? Any idea what I am doing wrong? > I'm not sure I understand why the documentation says that. Most control characters are illegal in XML, why would you want to include them? -- Anthony Jones - MVP ASP/ASP.NET | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
