468,268 Members | 1,656 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

XmlReader.Create always returns {None}

I am trying to create an XmlReader using XmlReader.Create, but it always
returns {None}. I have tried several examples from the web, and Create
always returns "{None}".

Here is my code:

XmlReaderSettings settings = new XmlReaderSettings();
settings.ConformanceLevel = ConformanceLevel.Fragment;
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true;
XmlReader reader = XmlReader.Create("C:\\MyFile.xml", settings);
Does anyone know what is wrong?

Thanks.

Sep 6 '06 #1
2 5955


Joe Rattz wrote:
I am trying to create an XmlReader using XmlReader.Create, but it always
returns {None}. I have tried several examples from the web, and Create
always returns "{None}".

Here is my code:

XmlReaderSettings settings = new XmlReaderSettings();
settings.ConformanceLevel = ConformanceLevel.Fragment;
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true;
XmlReader reader = XmlReader.Create("C:\\MyFile.xml", settings);
Where do you see or get that "{None}"? Do you get an exception when you
run the code?

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Sep 6 '06 #2
Sorry my error. I misinterpretted the {None} as not working. In fact,
something else I was passing the XmlReader to is not working, but the reader
is. I did some reads on the reader and it works just fine. My error.

Thanks.

"Martin Honnen" wrote:
>

Joe Rattz wrote:
I am trying to create an XmlReader using XmlReader.Create, but it always
returns {None}. I have tried several examples from the web, and Create
always returns "{None}".

Here is my code:

XmlReaderSettings settings = new XmlReaderSettings();
settings.ConformanceLevel = ConformanceLevel.Fragment;
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true;
XmlReader reader = XmlReader.Create("C:\\MyFile.xml", settings);

Where do you see or get that "{None}"? Do you get an exception when you
run the code?

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Sep 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Michael Malinak | last post: by
1 post views Thread by dongxm | last post: by
1 post views Thread by Angus Lepper | last post: by
6 posts views Thread by Rob Meade | last post: by
2 posts views Thread by jonfroehlich | last post: by
2 posts views Thread by raj | last post: by
1 post views Thread by Franck | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.