Example usage for org.apache.commons.jxpath.xml JDOMParser parseXML

List of usage examples for org.apache.commons.jxpath.xml JDOMParser parseXML

Introduction

In this page you can find the example usage for org.apache.commons.jxpath.xml JDOMParser parseXML.

Prototype

public Object parseXML(InputStream stream) 

Source Link

Usage

From source file:de.iai.ilcd.xml.read.DataSetReader.java

private DataSet parseStream(InputStream inputStream) {

    JDOMParser parser = new JDOMParser();
    parser.setValidating(false);//from ww  w .java2s .  c  o m
    Object doc = parser.parseXML(inputStream);
    JXPathContext context = JXPathContext.newContext(doc);
    context.setLenient(true);
    context.registerNamespace("common", "http://lca.jrc.it/ILCD/Common");

    parserHelper = new DataSetParsingHelper(context);
    commonReader = new CommonConstructsReader(parserHelper);

    return parse(context, out);
}