public abstract class SAXUtil extends Object
Constructor and Description |
---|
SAXUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getAttribute(String attributeName,
Attributes attributes)
Get the value of the named attribute.
|
static String |
getAttribute(String attributeName,
Attributes attributes,
String defaultVal)
Get the value of the named attribute.
|
static String |
getAttribute(String attributeNamespace,
String attributeName,
Attributes attributes,
String defaultVal)
Get the value of the named attribute.
|
static int |
getDepth(SAXElement element) |
static String |
getXPath(SAXElement element) |
static QName |
toQName(Element element)
|
static QName |
toQName(String namespaceURI,
String localName,
String qName)
Create a
QName instance from the supplied element naming parameters. |
public static String getAttribute(String attributeName, Attributes attributes)
attributeName
- The attribute name.attributes
- The attribute list.public static String getAttribute(String attributeName, Attributes attributes, String defaultVal)
attributeName
- The attribute name.attributes
- The attribute list.defaultVal
- The default value, if the attribute is not set.public static String getAttribute(String attributeNamespace, String attributeName, Attributes attributes, String defaultVal)
attributeNamespace
- The attribute namespace.attributeName
- The attribute name.attributes
- The attribute list.defaultVal
- The default value, if the attribute is not set.public static String getXPath(SAXElement element)
public static int getDepth(SAXElement element)
public static QName toQName(String namespaceURI, String localName, String qName)
QName
instance from the supplied element naming parameters.namespaceURI
- The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName
- The qualified name (with prefix), or the
empty string if qualified names are not available.QName
instance representing the element named by the supplied parameters.Copyright © 2020. All rights reserved.