|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectarcade.mod.model.XMLNode
public class XMLNode
Adapter to make a Node from an XML Document act as a ResourceNode. The children are the nested elements, the attributes are the attributes, the Description is the text held in the child named "Description"
Field Summary | |
---|---|
static java.lang.String |
DESCRIPTION_TAG
|
Constructor Summary | |
---|---|
XMLNode(org.w3c.dom.Node node)
Creates a new XMLNode object from a node in the XMLFile |
|
XMLNode(org.w3c.dom.Node node,
java.lang.String documentpath)
Creates a new XMLNode object including the filepath of the XML document. |
Method Summary | |
---|---|
java.lang.String |
getAttribute(java.lang.String attributeName)
Get a specified attribute out of the XML |
java.util.Collection<java.lang.String> |
getAttributes()
Get all of the attributes of this XMLNode |
java.util.List<IResourceNode> |
getChildren()
Get this XMLNode's children |
java.lang.String |
getDescription()
Get description of this XMLNode |
java.lang.String |
getModelPath()
|
org.w3c.dom.Node |
getNode()
Get this node in tree |
void |
setAttribute(java.lang.String attributeName,
java.lang.String value)
Set an attribute to a value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DESCRIPTION_TAG
Constructor Detail |
---|
public XMLNode(org.w3c.dom.Node node)
node
- public XMLNode(org.w3c.dom.Node node, java.lang.String documentpath)
Method Detail |
---|
public java.util.List<IResourceNode> getChildren()
getChildren
in interface IResourceNode
public java.util.Collection<java.lang.String> getAttributes()
getAttributes
in interface IResourceNode
public java.lang.String getAttribute(java.lang.String attributeName)
getAttribute
in interface IResourceNode
attributeName
- the name of the desired Attribute
public void setAttribute(java.lang.String attributeName, java.lang.String value)
setAttribute
in interface IResourceNode
attribute
- to setvalue
- to set attribute topublic java.lang.String getDescription()
getDescription
in interface IResourceNode
public java.lang.String getModelPath()
getModelPath
in interface IResourceNode
public org.w3c.dom.Node getNode()
getNode
in interface IResourceNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |