public final class XmlLineNumberParser extends Object
The line number and column number can be obtained from a Node/Element using
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 | Class and Description |
---|---|
static interface |
XmlLineNumberParser.XmlTextTransformer
Allows to plugin a custom text transformer in the parser, that can transform all the text content
|
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,
XmlLineNumberParser.XmlTextTransformer transformer)
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, XmlLineNumberParser.XmlTextTransformer transformer) throws Exception
is
- the XML content as an input streamException
- is thrown if error parsingApache Camel