Search the web
Sign In
New User? Sign Up
xmlpull-user
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: XmlPullParserException   Message List  
Reply | Forward Message #27 of 308 |
Re: XmlPullParserException

Zoe wrote:

>
> On Monday, Feb 10, 2003, at 19:10 Europe/Zurich, Aleksander Slominski
> wrote:
>
>> interesting idea. i will make optional feature (how
>> IGNORE_UNRESOLVED_ENTITY_REF sounds?) and if set it will make parser
>> to just skip over unresolvable entities without reporting error or
>> putting anything into reported XML content.
>>
>> how does it sound?
>
>
> Sounds good... but... I need the value of the entity (resolved or not)
> to be put in the TEXT content... this is because, even if it's not
> valid as far as xml goes... it might be valid in, say, html... so I
> would prefer not to loose the information entirely...

that could be done by adding unescaped entity name into text content
(another optional feature?).

> Also, considering all the invalid xml floating around... would it be
> possible to have something along the line of skipNext() or perhaps a
> new type like INVALID_XML or something... that would allow the parser
> to keep going even if it encounters some unorthodox content?

it is hard to know when to call skipNext( )and how to recover from lot
of errors (for example user that have unclosed quotation mark ...) or
what to do with reported INVALID_XML - start tag content may be also
invalid not only element text

> Thoughts?

that would mean even more of bad/pseudo XML around the same way as HTML
browsers allow and deal with incorrect input *but* this is our internet
(or RSS) reality and we have to deal with it.

to solve it i would like to think about some (required) interface to
report to user all problems with XML (that were ignored) so this could
be presented by GUI and help to resolve XML incompatibilities with the
author of XML -i am not sure what would be the best way to do it, maybe
just require user to retrieve Enumeration with strings containing error
description with line/number position...

so i was thinking about
* optional feature LENIENT_XML_FEATURE that would allow parser to skip
recoverable errors (like non existing entity ref)
* optional feature LENIENT_XML_LEAVE_ENTITY_FEATURE to report entity ref
in element content (and not have it removed)
* optional property REPORT_LENIENT_XML_PROPERTY that would be used to
retrieve Enumeration to read description of XML problems.

as long as it is optional feature and there is enough interest/use cases
for it i see no reason why not add it to XPP3.

if you send to me patch of modifications where you think XPP3 should be
more forgiving for not 100% correct XML i can look into adding them into
XPP3.

thanks,

alek

--
"Mr. Pauli, we in the audience are all agreed that your theory is crazy.
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr





Mon Feb 10, 2003 7:03 pm

as10m
Offline Offline
Send Email Send Email

Forward
Message #27 of 308 |
Expand Messages Author Sort by Date

... hi, XML parser is required to resolve entities. the best way around it is not to include non-standard XML entities :-) XML 1.0 defined few standard entity...
Aleksander Slominski
as10m
Offline Send Email
Feb 10, 2003
5:46 pm

... interesting idea. i will make optional feature (how IGNORE_UNRESOLVED_ENTITY_REF sounds?) and if set it will make parser to just skip over unresolveable...
Aleksander Slominski
as10m
Offline Send Email
Feb 10, 2003
6:11 pm

... that could be done by adding unescaped entity name into text content (another optional feature?). ... it is hard to know when to call skipNext( )and how to...
Aleksander Slominski
as10m
Offline Send Email
Feb 10, 2003
7:04 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help