Hi,
It would be better if somebody helps me to resolve an issue I am facing while converting XML
string into JDom Document object.
The XML string looks as
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>
<displayText>
</displayText>
<linkItem>
<link pageID="Person_homePagePage.do" modal="true">
<displayText>David</displayText>
<params>
<param name="id">10000</param>
</params>
</link>
</linkItem>
<displayText>is 30 years old.</displayText>
</item>
</items>
and
java code looks as
org.jdom.Document document = null;
SAXBuilder builder = new SAXBuilder();
try {
document = builder.build(new StringReader(xmlString));
} catch (JDOMException e) {
//
} catch (IOException e) {
//
} catch (Exception e) {
//
}
return document;
in runtime I get error like [Document: No DOCTYPE declaration, Root is [Element: <items/>]]
Can somebody helps me what is the problem with the XML and how can I resolve this issue?
Thanks in advance.