Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Error loading document with processing instructions using .NET >Thread Next - Re: Error loading document with processing instructions using .NET Re: Error loading document with processing instructions using .NETTo: NULL Date: 9/1/2004 11:04:00 PM Hi Mike, I am getting the same error. From what I can tell the parser is lumping together 2 processing instructions into 1. i.e. <? p1 ?><? p2 ?> The parser interprets this as one whole processing instruction with inner text of "p1 ?><? p2", hence the "Cannot have '?>' inside an XML processing instruction." What I want to know is why and when it does this. Placing spaces at various places can make the error go away, but sometimes not. Has anyone heard of this before or know exactly what causes it? Thanks Fernando "Mike Lansdaal" <michael.t.lansdaal@b...> wrote in message news:<OdbseV3jEHA.592@T...>... > More data on this: > > 1) Changing the length of the data in the <title> tag of the <table> will > cause the parser to fail in either <tablerow> 16 or 18. > 2) Adding or deleting a single character in the processing instruction of > the node where the failure occurs can cause the parser to parse correctly. > 3) When the parser fails, it reports a row as having 35 child nodes, instead > of 37. > 4) Extracting just the <tablerow> where the parser fails and trying to load > that snippet always loads fine. > > 4) Documents that fail to load with System.XML will load correctly when > using MSXML4 library. > > > "Mike Lansdaal" <michael.t.lansdaal@b...> wrote in message > news:%23ty48$sjEHA.3944@t...... > > I am getting an error "Cannot have '?>' inside an XML processing > > instruction." when accessing the innerXML property of a document (I'm > using > > C# to load the document). The error disappears if the file is editted to > > insert line breaks (just load and save in XMLSpy or if I use a text editor > > and manally insert line breaks) or even change the text size by a single > > character. As a workaround, this can be done programmatically, but does > not > > address the underlying problem. > > > > The structure of the particular section where the error is being reported > > (in this large XML file) is: > > > > <tablerow rht="15.00px"> > > <cellrule rty="-"/> > > <tablecell chj="c" cvj="t" shd="0"><?Pub _cellfont > > TypeSize="9pt"?>19</tablecell> > > <cellrule rty="-"/> > > > > etc.... > > > > </tablerow> > > > > The exception is thrown for each <tablecell> of a particular row - not for > > the cells in prior or successive rows. I can not spot broken or malformed > > tags when looking at the raw data in an editor, nor does there appear to > be > > any non-printing characters when I view with a binary file editor. > > > > Any thoughts? > > > > Thanks, Mike Lansdaal > > > > > > > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
