Package com.highdeal.hci
Class XMLNode
java.lang.Object
com.highdeal.hci.XMLNode
- All Implemented Interfaces:
XMLMarshallable
Helper class that can be used during parsing of spurious tags.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Gets the attributes of this XML node.Returns the character data for this node.getChild()Returns the child of this node.Returns all the children of this node.getTag()Gets the name of the tag.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidvoidSets the name of the tag
-
Constructor Details
-
XMLNode
public XMLNode()Constructs an empty XML node.
-
-
Method Details
-
getTag
Gets the name of the tag.- Returns:
- the name of the tag.
-
setTag
Sets the name of the tag- Parameters:
t- the name of the tag.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
setAttributesWithoutFreeze
-
getAttributes
Gets the attributes of this XML node.- Returns:
- the attributes of this XML node.
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
getCharacterData
Returns the character data for this node.- Returns:
- the character data for this node.
-
getChild
Returns the child of this node.- Returns:
- the child of this node.
-
getChildren
Returns all the children of this node.- Returns:
- the children of this node.
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-