public class XmlElementField extends XmlFieldFormat
FieldFormat for a field in an XML formatted stream parsed as
an element of its parent.XML_TYPE_ATTRIBUTE, XML_TYPE_ELEMENT, XML_TYPE_NONE, XML_TYPE_TEXT| Constructor and Description |
|---|
XmlElementField()
Constructs a new XmlElementField.
|
| Modifier and Type | Method and Description |
|---|---|
String |
extractText(XmlUnmarshallingContext context)
Extracts a field from a record during unmarshalling.
|
String |
getLocalName()
Returns the XML local name for this node.
|
String |
getNamespace()
Returns the namespace of this node.
|
String |
getPrefix()
Returns the namespace prefix for marshaling this node, or null
if the namespace should override the default namespace.
|
int |
getType()
Returns the XML node type.
|
void |
insertText(XmlMarshallingContext ctx,
String fieldText)
Inserts a field into the record during marshalling.
|
boolean |
isNamespaceAware()
Returns true if a namespace was configured for this node, and is
therefore used to unmarshal and marshal the node.
|
boolean |
isNillable()
Returns whether this field is nillable.
|
boolean |
isRepeating()
Returns whether this node may repeat in the context of its immediate parent.
|
void |
setLocalName(String localName)
Sets the element name.
|
void |
setNamespace(String namespace)
Sets the namespace of this element.
|
void |
setNamespaceAware(boolean namespaceAware)
Sets whether this element is namespace aware.
|
void |
setNillable(boolean nillable)
Sets whether this element is nillable.
|
void |
setPrefix(String prefix)
Sets a prefix to use for the namespace during marshalling.
|
void |
setRepeating(boolean repeating)
Sets whether this element repeats within the context of its parent.
|
void |
toParamString(StringBuilder s)
Called by
XmlFieldFormat.toString() to append attributes of this field. |
extract, getName, getPadding, getSize, insertField, insertValue, isLazy, setLazy, setName, setPadding, toStringpublic String extractText(XmlUnmarshallingContext context)
XmlFieldFormatextractText in class XmlFieldFormatcontext - the XmlUnmarshallingContext holding the recordpublic void insertText(XmlMarshallingContext ctx, String fieldText)
XmlFieldFormatinsertText in class XmlFieldFormatctx - the XmlMarshallingContext holding the recordfieldText - the field text to insertpublic boolean isRepeating()
XmlNodepublic void setRepeating(boolean repeating)
repeating - true if repeating, false otherwisepublic int getType()
XmlNodeXmlNode.XML_TYPE_NONE,
XmlNode.XML_TYPE_ELEMENT,
XmlNode.XML_TYPE_ATTRIBUTE, or
XmlNode.XML_TYPE_TEXTpublic String getLocalName()
XmlNodepublic void setLocalName(String localName)
localName - the element namepublic String getNamespace()
XmlNodepublic void setNamespace(String namespace)
namespace - the namespacepublic String getPrefix()
XmlNodepublic void setPrefix(String prefix)
prefix - the namespace prefixpublic boolean isNillable()
FieldFormatpublic void setNillable(boolean nillable)
nillable - true if nillable, false otherwisepublic boolean isNamespaceAware()
XmlNodepublic void setNamespaceAware(boolean namespaceAware)
namespaceAware - true if namespace aware, false otherwisepublic void toParamString(StringBuilder s)
XmlFieldFormatXmlFieldFormat.toString() to append attributes of this field.toParamString in class XmlFieldFormats - the text to append