public class XML20 extends java.lang.Object implements AbstractXML
Constructor and Description |
---|
XML20(processing.core.PApplet parent,
java.lang.String fileName)
Creates a version-neutral abstracted XML object by loading the XML file with the given name.
|
XML20(processing.data.XML xml)
Creates a new abstracted XML element from the given Processing 2.0 XML object.
|
Modifier and Type | Method and Description |
---|---|
AbstractXML[] |
getChildren()
Provides all of this element's children.
|
java.lang.String |
getContent()
Provides the content this XML element.
|
java.lang.String |
getName()
Provides this XML element's full name.
|
java.lang.String |
getString(java.lang.String attribute)
Provides the value of the given attribute of the XML element.
|
java.lang.String[] |
listAttributes()
Provides a list of all the XML element's attributes as an array.
|
public XML20(processing.core.PApplet parent, java.lang.String fileName)
parent
- Sketch from which the XML file is to be loaded.fileName
- Name of file to load.public XML20(processing.data.XML xml)
xml
- XML object to be wrapped by this version-neutral abstraction.public java.lang.String[] listAttributes()
listAttributes
in interface AbstractXML
public java.lang.String getString(java.lang.String attribute)
getString
in interface AbstractXML
attribute
- Attribute for which a value is to be reported.public java.lang.String getContent()
getContent
in interface AbstractXML
public java.lang.String getName()
getName
in interface AbstractXML
public AbstractXML[] getChildren()
getChildren
in interface AbstractXML