* @param pstrXPathExpr = if null, the full XML-String is loaded
*/
public Properties LoadXML(JSXMLFile pobjXMLFile, String pstrXPathExpr) {
@SuppressWarnings("unused")
final String conMethodName = conClassName + "::LoadXML";
DOMParser parser = new DOMParser();
Properties objProp = new Properties();
try {
parser.setFeature("http://xml.org/sax/features/validation", false);
// The parser will validate the document only if a grammar is specified.
// parser.setFeature("http://xml.org/sax/features/validation/dynamic", true);
}
catch (Exception e) {
e.printStackTrace();
throw new JobSchedulerException(String.format("SAXException ", pobjXMLFile.getAbsolutePath()));
}
try {
// parser.parse(new ByteArrayInputStream(pstrXMLAsString.getBytes()));
parser.parse(pobjXMLFile.getAbsolutePath());
Document document = parser.getDocument();
if (isEmpty(pstrXPathExpr) == true) {
traverse(document, objProp);
}
else {
SOSXMLXPath xPath = new SOSXMLXPath(pobjXMLFile.getAbsolutePath());