[jdom-interest] attribute values with "&"

Steve Bucknam steve at TataraSystems.com
Wed Dec 4 11:20:02 PST 2002


I have the following XML document in a file called "foo.xml":
 
        <?xml version="1.0" encoding="UTF-8"?>
        <a>
            <b y="/a?b=c&d=f">a</b>
        </a>
 
My code is :
 
        SAXBuilder builder = new SAXBuilder();
        Reader reader = new FileReader( "foo.xml" );
        builder.build( new BufferedReader( reader ) );
 
results in the error message:
 
        org.jdom.JDOMException: Error on line 1: The reference to entity
"d" must end with the ';' delimiter.

I have no control over the input file.  It is being supplied by a
partner.  I have to parse this file and return a new version with a
similar attribute value.  Is this a valid XML attribute value?  If so,
what can I do to parse this file?
 
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20021204/265e564d/attachment.htm


More information about the jdom-interest mailing list