Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Bug in xml parser?
Re: Bug in xml parser? [message #27551 is a reply to message #27292] Fri, 23 July 2010 10:46 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14265
Registered: November 2005
Ultimate Member
aftershock wrote on Sun, 18 July 2010 05:12

luzr wrote on Sun, 18 July 2010 10:03

aftershock wrote on Mon, 12 July 2010 12:27

I think this is the fix
void XmlParser::Next()
{
nattr.Clear();
nattr1 = nattrval1 = Null;
if(empty_tag) {
empty_tag = false;
type = XML_END;
return;
}
text.Clear();
type = XML_EOF;
if (!(npreserve || preserveall)) //<-- this should be added
SkipWhites();


The problem is the initial whitespace and EOL is thrown away which is not good.
Your other fix seems to be ok.

Have a good day!

Marton





Hi,

I had to revert this patch as it completely breaks any existing XML code.

I suggest you to send me some testcase demonstrating XML that needs XmlParser to be fixed, I will try to find some workaround.

Mirek

It was not my intention Really? How does it break them?

E.g
<value> myvalue</value>
This should return " myvalue" if it is read..


Marton



That is not a problem. The trouble is that when active, it will not skip any whitespaces in between tags, so:

<tag1>
   <tag2>


cannot be parsed with

   if(Tag("tag1") && Tag("tag2"))


as there is now Text element in between....

Sure, perhaps we might try to alter parser philosophy, but at this point I think that would be dangerous and we should try to find another solution first...

Mirek

(reposting back to forum to eventually gather more comments).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: navigate does not always work correctly
Next Topic: SliderCtrl max check
Goto Forum:
  


Current Time: Tue Jul 08 10:13:03 CEST 2025

Total time taken to generate the page: 0.02488 seconds