public final class PositionalXMLReader extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PositionalXMLReader.PositionalHandler
XML Handler dedicated to retrieve current line.
|
Modifier and Type | Field and Description |
---|---|
static String |
LINE_NUMBER_KEY_NAME |
Modifier and Type | Method and Description |
---|---|
static void |
autoSafeSetFromAttributes(Node node,
Object obj,
Set<String> ignore)
Sets values in object from attributes values, ignoring attributes in provided set and those without corresponding field.
|
static void |
autoSetFromAttributes(Node node,
Object obj,
Set<String> ignore)
Sets values in object from attributes values, ignoring attributes in provided set.
|
static void |
autoSetFromAttributes(Node node,
Object obj,
Set<String> ignore,
Map<String,String> aliases)
Sets values in object from attributes values, ignoring attributes in provided set and using aliases
to convert node name to property name.
|
static void |
autoSetFromChildren(Node node,
Object obj,
Set<String> ignore)
Sets values in object from children nodes names and values, ignoring nodes names in provided set.
|
static void |
autoSetFromChildren(Node node,
Object obj,
Set<String> ignore,
Map<String,String> aliases)
Sets values in object from children nodes names and values, ignoring nodes names in provided set and using aliases
to convert node name to property name.
|
static String |
getAttrData(Node node,
String name) |
static String |
getAttrData(Node node,
String name,
boolean mandatory) |
static boolean |
hasAttribute(Node node,
String name) |
static Node |
nextElement(Node n,
boolean moveFirst) |
static String |
normalizeNodeName(String name)
Transforms a node (attribute or tag) name formatted as "my-node-name" into "myNodeName" in
order to be compatible with java reflexion, for example to be used by autoSetFrom[Attributes | Children].
|
static Document |
readXML(InputSource is) |
static Document |
readXML(InputSource is,
EntityResolver resolver) |
public static final String LINE_NUMBER_KEY_NAME
public static Document readXML(InputSource is) throws IOException, SAXException
IOException
SAXException
public static Document readXML(InputSource is, EntityResolver resolver) throws IOException, SAXException
IOException
SAXException
public static Node nextElement(Node n, boolean moveFirst) throws XMLUtilsException
XMLUtilsException
public static String getAttrData(Node node, String name, boolean mandatory) throws XMLUtilsException
XMLUtilsException
public static String getAttrData(Node node, String name) throws XMLUtilsException
XMLUtilsException
public static void autoSafeSetFromAttributes(Node node, Object obj, Set<String> ignore) throws XMLUtilsException
XMLUtilsException
- if an error occurs.public static void autoSetFromAttributes(Node node, Object obj, Set<String> ignore) throws XMLUtilsException
XMLUtilsException
- if field corresponding to attribute is not found.public static void autoSetFromAttributes(Node node, Object obj, Set<String> ignore, Map<String,String> aliases) throws XMLUtilsException
XMLUtilsException
- if field corresponding to attribute is not found.public static void autoSetFromChildren(Node node, Object obj, Set<String> ignore) throws XMLUtilsException
XMLUtilsException
- if field corresponding to children node name is not found.public static void autoSetFromChildren(Node node, Object obj, Set<String> ignore, Map<String,String> aliases) throws XMLUtilsException
XMLUtilsException
- if field corresponding to children node name is not found.public static String normalizeNodeName(String name)
name
- name to normalize