Re: XMLTextReader reading too many characters
- From: "JohnB" <do_not_spam_me_john.bidondo@xxxxxxxxxxx>
- Date: Wed, 8 Aug 2007 11:31:38 -0500
Martin
There was no guesswork involved in how the sample should look or be
corrected. I provided that answer in your query about it. I quote:
Martin
That's just a typo from when I cut and pasted the sample document
together.
Remove/delete the extra tag <DistrictPrecinctPart> to make the
correction.
John
It was a very simple process to delete the extra tag. If you were still
unsure of which tag, a 10 second validation using an XML validator would
have quickly and easily resolved that confusion. You do know about XML
validators, being a Microsoft MVP XML, right? That's immaterial at this
point, the valid document was provided in my last response.
The process I have to parse the document uses 1.1 not 2.0. If there is an
issue with the XMLTextReader, it would be in 1.1. However, since this
avenue of investigation is bearing little fruit, I surrender and will not
continue with you down this path.
Thanks for taking a look at it, despite the recent poor communication.
John
"Martin Honnen" <mahotrash@xxxxxxxx> wrote in message
news:exZRx$c2HHA.4584@xxxxxxxxxxxxxxxxxxxxxxx
JohnB wrote:
I don't know for certain if it was your intention, but the tone of your
message is hostile. I am not wasting your time. I had presumed that you
had the knowledge of how to delete a tag from an XML document, though
perhaps I over estimated your abilities. Maybe a Microsoft MVP XML
status isn't indicative of being capable of editing an XML document.
Here again is the XML document sample with the offending tag removed.
If you claim there is a problem with XmlTextReader and an allegedly
well-formed XML document but then provide an XML sample that is not
well-formed then it does not help that I edit the document. You need to
provide a sample that allows us to reproduce the problem. I am not able to
guess how your sample looks that allegedly has the problem.
With the sample you have no provided I have no problems to read it with
XmlReader or XmlTextReader, it parses through the sample without giving
the error you claim it produces.
Simple test code is
using (XmlTextReader xmlTextReader = new
XmlTextReader(@"test2007080702.xml"))
{
while (xmlTextReader.Read())
{
Console.WriteLine("{0}: {1}.", xmlTextReader.NodeType,
xmlTextReader.Name);
}
}
Tested with .NET 2.0.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.
- References:
- XMLTextReader reading too many characters
- From: JohnB
- Re: XMLTextReader reading too many characters
- From: Martin Honnen
- Re: XMLTextReader reading too many characters
- From: JohnB
- Re: XMLTextReader reading too many characters
- From: Martin Honnen
- Re: XMLTextReader reading too many characters
- From: JohnB
- Re: XMLTextReader reading too many characters
- From: Martin Honnen
- Re: XMLTextReader reading too many characters
- From: JohnB
- Re: XMLTextReader reading too many characters
- From: Martin Honnen
- Re: XMLTextReader reading too many characters
- From: JohnB
- Re: XMLTextReader reading too many characters
- From: Martin Honnen
- Re: XMLTextReader reading too many characters
- From: JohnB
- Re: XMLTextReader reading too many characters
- From: Martin Honnen
- XMLTextReader reading too many characters
- Prev by Date: Re: XMLTextReader reading too many characters
- Next by Date: Dataset to xmlk with nested elements
- Previous by thread: Re: XMLTextReader reading too many characters
- Next by thread: Re: XMLTextReader reading too many characters
- Index(es):
Relevant Pages
|