Interface XmlNode
-
- All Known Implementing Classes:
XmlAttributeField
,XmlElementField
,XmlFieldFormat
,XmlSelectorWrapper
,XmlTextField
,XmlWrapper
public interface XmlNode
- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
XML_TYPE_ATTRIBUTE
Attribute XML node typestatic int
XML_TYPE_ELEMENT
Element XML node typestatic int
XML_TYPE_NONE
XML type indicating no nodestatic int
XML_TYPE_TEXT
Text XML node type
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getLocalName()
Returns the XML local name for this node.java.lang.String
getNamespace()
Returns the namespace of this node.java.lang.String
getPrefix()
Returns the namespace prefix for marshaling this node, ornull
if the namespace should override the default namespace.int
getType()
Returns the XML node type.boolean
isNamespaceAware()
Returnstrue
if a namespace was configured for this node, and is therefore used to unmarshal and marshal the node.boolean
isNillable()
Returns whether this node is nillable.boolean
isRepeating()
Returns whether this node may repeat in the context of its immediate parent.
-
-
-
Field Detail
-
XML_TYPE_TEXT
static final int XML_TYPE_TEXT
Text XML node type- See Also:
- Constant Field Values
-
XML_TYPE_ELEMENT
static final int XML_TYPE_ELEMENT
Element XML node type- See Also:
- Constant Field Values
-
XML_TYPE_ATTRIBUTE
static final int XML_TYPE_ATTRIBUTE
Attribute XML node type- See Also:
- Constant Field Values
-
XML_TYPE_NONE
static final int XML_TYPE_NONE
XML type indicating no node- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
int getType()
Returns the XML node type.- Returns:
- one of
XML_TYPE_NONE
,XML_TYPE_ELEMENT
,XML_TYPE_ATTRIBUTE
, orXML_TYPE_TEXT
-
getLocalName
java.lang.String getLocalName()
Returns the XML local name for this node.- Returns:
- the XML local name
-
getNamespace
java.lang.String getNamespace()
Returns the namespace of this node. If there is no namespace for this node, or this node is not namespace aware,null
is returned.- Returns:
- the XML namespace of this node
-
isNamespaceAware
boolean isNamespaceAware()
Returnstrue
if a namespace was configured for this node, and is therefore used to unmarshal and marshal the node.- Returns:
true
if this node uses a namespace for matching and formatting this node
-
getPrefix
java.lang.String getPrefix()
Returns the namespace prefix for marshaling this node, ornull
if the namespace should override the default namespace.- Returns:
- the namespace prefix
-
isNillable
boolean isNillable()
Returns whether this node is nillable.- Returns:
true
if this node is nillable
-
isRepeating
boolean isRepeating()
Returns whether this node may repeat in the context of its immediate parent.- Returns:
- true if this node repeats, false otherwise
-
-