A
Alessandro
Hello,
I need to read an XML file using JDOM. Issue is that I get a "null"
reference of Root node.
I was asking if this was due to the not existence of schema definition
file (http://www.myserver/ReportRequest.xsd) or if it was for other
reasons.
Is there also any workaround to browse and process an XML file without
having XSD file ?
//START CODE
<?xml version="1.0"?>
<ReportRequest xmlns="http://www.myserver/ReportRequest.xsd">
<ReportTemplate>
<ReportAction>Replace</ReportAction>
<Name>TimeSeries</Name>
...
</ReportTemplate>
</ReportRequest>
***
....
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = factory.newDocumentBuilder();
Document doc=docBuilder.parse(filePath);
Node root=doc.getDocumentElement();
....
//END CODE
Thanks all,
best rgds
Ale
I need to read an XML file using JDOM. Issue is that I get a "null"
reference of Root node.
I was asking if this was due to the not existence of schema definition
file (http://www.myserver/ReportRequest.xsd) or if it was for other
reasons.
Is there also any workaround to browse and process an XML file without
having XSD file ?
//START CODE
<?xml version="1.0"?>
<ReportRequest xmlns="http://www.myserver/ReportRequest.xsd">
<ReportTemplate>
<ReportAction>Replace</ReportAction>
<Name>TimeSeries</Name>
...
</ReportTemplate>
</ReportRequest>
***
....
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = factory.newDocumentBuilder();
Document doc=docBuilder.parse(filePath);
Node root=doc.getDocumentElement();
....
//END CODE
Thanks all,
best rgds
Ale