|
-
Mar 3rd, 2005, 09:31 AM
#1
Thread Starter
Junior Member
Knowledge limitation in XmlTextReader
Hi Guys,
I am currently facing a problem with XmlTextReader. I use XmlTextReader.Read() to read an xml document. Following is a portion of the document:
<title> XML & XHTML </title>
What I would like to do is to copy the whole text without any modification on it and assign it to a string, xmlDoc.
Therefore the expected result is:
xmlDoc = " XML & XHTML "
However, XmlTextReader.Read() automatically converts that text into " XML & XHTML ". So the result that I get is:
xmlDoc = " XML & XHTML "
May I know, is there any solution to solve this problem? I have been thinking of the char by char checking. After detecting the char "&" then assign "&" to the string. But this way is not practical at all because other than "&", we still have many special character like ©, <, >, etc
I would appreciate any reply, thank you
-
Mar 3rd, 2005, 03:46 PM
#2
Addicted Member
Re: Knowledge limitation in XmlTextReader
Well if you do end up doing char-by-char checking, you can just read from the & through the ; and convert that to the string.
-
Mar 4th, 2005, 08:27 AM
#3
Thread Starter
Junior Member
Re: Knowledge limitation in XmlTextReader
But in that case the work will become tedious. Is it no other way to solve this out?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|