[jdom-interest] Problem with mixed content

Vyacheslav Pedak san at most5.krasnoyarsk.su
Mon Sep 11 20:07:31 PDT 2000


Hi,

I dowloaded JDom sources from 09.08.2000.
I have simple xml like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<test>
  <element>
    text
  </element>
</test>

and when I do 

        Document doc = builder.build(new File(filename));
        Element root = doc.getRootElement();
        System.out.println("hasMixedContent="+root.hasMixedContent());

I receive true, but there no mixed content in this xml.

I think the problem is in white space, because when I made xml like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<test><element>text</element></test>

all works fine.

Regards,
Vyacheslav Pedak.




More information about the jdom-interest mailing list