[Issue 4509] New: XML parser in std.xml throws TagException if the attr value is put in apostrophes.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 26 10:24:44 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4509
Summary: XML parser in std.xml throws TagException if the attr
value is put in apostrophes.
Product: D
Version: D2
Platform: x86
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: the.mail.of.mi2 at gmail.com
--- Comment #0 from Mitu <the.mail.of.mi2 at gmail.com> 2010-07-26 10:24:43 PDT ---
The best way to illustrate this error is this code:
[code]
import std.xml;
void main()
{
string goesRight = `<?xml version='1.0' encoding='UTF-8'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"
from="jid.pl" id="587a5767" xml:lang="en" version="1.0"></stream:stream>`;
string goesWrong = `<?xml version='1.0' encoding='UTF-8'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'
from='jid.pl' id='587a5767' xml:lang='en' version='1.0'></stream:stream>`;
DocumentParser parser = new DocumentParser(goesRight);
}
[/code]
It creates a DocumentParser object and shuts down. But when change the
constructor argument to goesWrong (the only difference between the two strings
are " changed to '. Please note that in the prologue it doesn't matter), it
results in TagError.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list