public final class XmlLineNumberParser extends Object
String lineNumber = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER); String lineNumberEnd = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER_END); String columnNumber = (String) node.getUserData(XmlLineNumberParser.COLUMN_NUMBER); String columnNumberEnd = (String) node.getUserData(XmlLineNumberParser.COLUMN_NUMBER_END);
Modifier and Type | Field and Description |
---|---|
static String |
COLUMN_NUMBER |
static String |
COLUMN_NUMBER_END |
static String |
LINE_NUMBER |
static String |
LINE_NUMBER_END |
Modifier and Type | Method and Description |
---|---|
static Document |
parseXml(InputStream is)
Parses the XML.
|
static Document |
parseXml(InputStream is,
String rootNames,
String forceNamespace)
Parses the XML.
|
public static final String LINE_NUMBER
public static final String COLUMN_NUMBER
public static final String LINE_NUMBER_END
public static final String COLUMN_NUMBER_END
public static Document parseXml(InputStream is) throws Exception
is
- the XML content as an input streamException
- is thrown if error parsingpublic static Document parseXml(InputStream is, String rootNames, String forceNamespace) throws Exception
is
- the XML content as an input streamrootNames
- one or more root names that is used as baseline for beginning the parsing, for example camelContext to start parsing
when Camel is discovered. Multiple names can be defined separated by commaforceNamespace
- an optional namespace to force assign to each node. This may be needed for JAXB unmarshalling from XML -> POJO.Exception
- is thrown if error parsingApache Camel