By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,037 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,037 IT Pros & Developers. It's quick & easy.

XmlReader Problem

P: n/a
I am using the XmlReader to read the content of XML File.

However, If the XML contain "&" character, it will throw exception.

How to solve , any idea?
Thank You

Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hey LaLaBoy

This article might be of help to you
http://support.microsoft.com/default...kb;en-us;31606

Regards, Jakob.
Nov 18 '05 #2

P: n/a
Hello, Thank you for your reply, bu

It doesn't solve the problem for special character "<
Thank Yo

------------
strline = strm.ReadLin
Dim lineposition As Int3
lineposition = InStr(strline, "&"
If lineposition > 0 The
strreplace = "&amp;
Els
lineposition = InStr(2, strline, "<"
If lineposition > 0 The
strreplace = "<
End I
End I

Nov 18 '05 #3

P: n/a
Hej LaLaBoy,

I think there may be an error in the code you pasted. The line

strreplace = "<"

should be replaced with

strreplace = "&lt;"

Regards, Jakob.

----- LaLaBoy wrote: -----

Hello, Thank you for your reply, but

It doesn't solve the problem for special character "<"
Thank You

-------------
strline = strm.ReadLine
Dim lineposition As Int32
lineposition = InStr(strline, "&")
If lineposition > 0 Then
strreplace = "&amp;"
Else
lineposition = InStr(2, strline, "<")
If lineposition > 0 Then
strreplace = "<"
End If
End If

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.