Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

unexpected token. The expected token is '='.

$
0
0

Hi I am running below code and I am getting below error,

'ID' is an unexpected token. The expected token is '='. Line 1, position 15.

MY code is below.

 string ss = "<item product ID='124390'>" +

                       "<price>5.95</price>" +
                       "</item>";

            XmlReaderSettings settings = new XmlReaderSettings();
            settings.IgnoreComments = true;
            settings.IgnoreProcessingInstructions = true;
            settings.IgnoreWhitespace = true;
            XmlReader xmlReader = XmlReader.Create(new StringReader(ss), settings);

            while (xmlReader.Read())
            {

            }

I know this error coming with space before ID. How to resolve this issue.

thank you

Amitsp


Amitsp


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>