|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectelectric.xml.Node
electric.xml.Child
electric.xml.Parent
electric.xml.Element
Element represents an XML element, and includes methods for manipulating attributes and child nodes. Some of the accessors support a useful subset of XPath.
Field Summary |
Fields inherited from class electric.xml.Parent |
children |
Fields inherited from class electric.xml.Child |
parent |
Fields inherited from class electric.xml.Node |
list, next, prev |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface electric.xml.IXMLConstants |
ATTLIST_START, ATTLIST_STOP, CDATA, CDATA_START, CDATA_STOP, CLOSE_TAG, COLON, COMMENT_START, COMMENT_STOP, DOCTYPE_START, DOCTYPE_STOP, ELEMENTDECL_START, ELEMENTDECL_STOP, ENCODING, ENTITYDECL_START, ENTITYDECL_STOP, ID, ID_CASE, INSTRUCTION_START, INSTRUCTION_STOP, NEGATIVE_INFINITY, NOT_A_NUMBER, NOTATIONDECL_START, NOTATIONDECL_STOP, NULL, OPEN_TAG, POSITIVE_INFINITY, PUBLIC, SPECIALS, STANDALONE, SUBSTITUTES, SYSTEM, UNDEFINED, VERSION, XML, XML_NAMESPACE, XMLDECL_START, XMLDECL_STOP, XMLNS, XMLNS_NAMESPACE |
Fields inherited from interface electric.xml.IDOMConstants |
CDATA_SECTION_NAME, COMMENT_NAME, CORE, DOCUMENT_FRAGMENT_NAME, DOCUMENT_NAME, HIERARCHY_REQUEST_ERR, TEXT_NAME |
Constructor Summary | |
Element()
Construct an Element with name set to "UNDEFINED" and no parent. |
|
Element(Element element)
Construct a copy of the specified Element. |
|
Element(java.lang.String name)
Construct an Element with the specified name and no parent. |
|
Element(java.lang.String prefix,
java.lang.String name,
java.lang.String namespace)
Construct an Element with the specified prefix, name and namespace. |
Method Summary | |
protected void |
addNamespacePrefixes(java.lang.String namespace,
java.util.Vector prefixes,
java.util.Vector matches)
Add all the prefixes that map to a particular namespace value in my context to the specified vector. |
Element |
addText(java.lang.String text)
Add a Text node with the specified text. |
Element |
addText(Text text)
Add a Text node with the specified text. |
java.lang.Object |
clone()
Return a clone of this Element. |
java.lang.String |
getAttribute(java.lang.String name)
Return my first Attribute node with the specified name, or null if I have none. |
org.w3c.dom.Attr |
getAttributeNode(java.lang.String name)
|
org.w3c.dom.Attr |
getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
|
java.lang.String |
getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
|
Attribute |
getAttributeObject(IXPath xpath)
Return my first Attribute node with the specified xpath, or null if I have none. |
Attribute |
getAttributeObject(java.lang.String name)
Return my first Attribute node with the specified name, or null if I have none. |
Attribute |
getAttributeObject(java.lang.String namespace,
java.lang.String name)
Return my first Attribute node with the specified namespace and name, or null if I have none. |
Attributes |
getAttributeObjects()
Return an enumeration over my Attributes. |
org.w3c.dom.NamedNodeMap |
getAttributes()
Return a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise |
Attributes |
getAttributes(IXPath xpath)
Return my Attribute nodes with the specified xpath. |
java.lang.String |
getAttributeValue(IXPath xpath)
Return the value of my first Attribute node with the specified xpath, or null if I have none. |
java.lang.String |
getAttributeValue(java.lang.String name)
Return the value of my first Attribute node with the specified name, or null if I have none. |
java.lang.String |
getAttributeValue(java.lang.String namespace,
java.lang.String name)
Return the value of my first Attribute node with the specified namespace and name, or null if I have none. |
boolean |
getBoolean()
Return the element text converted to a boolean. |
boolean |
getBoolean(java.lang.String name)
Return the element text of the named child converted to a boolean. |
boolean |
getBoolean(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a boolean. |
byte |
getByte()
Return the element text converted to a byte. |
byte |
getByte(java.lang.String name)
Return the element text of the named child converted to a byte. |
byte |
getByte(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a byte. |
char |
getChar()
Return the element text converted to a char. |
char |
getChar(java.lang.String name)
Return the element text of the named child converted to a char. |
char |
getChar(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a char. |
java.lang.String |
getDefaultNamespace()
Return the value of the default namespace, or null if there is none. |
double |
getDouble()
Return the element text converted to a double. |
double |
getDouble(java.lang.String name)
Return the element text of the named child converted to a double. |
double |
getDouble(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a double. |
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String name)
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
|
Element |
getElementWithId(java.lang.String value)
Return the element whose "id" attribute is equal to the specified value, or null if none exists. |
float |
getFloat()
Return the element text converted to a float. |
float |
getFloat(java.lang.String name)
Return the element text of the named child converted to a float. |
float |
getFloat(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a float. |
java.util.Hashtable |
getIds()
|
int |
getInt()
Return the element text converted to an int. |
int |
getInt(java.lang.String name)
Return the element text of the named child converted to an int. |
int |
getInt(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to an int. |
java.lang.String |
getLocalName()
Returns the local part of the qualified name of this node. |
long |
getLong()
Return the element text converted to a long. |
long |
getLong(java.lang.String name)
Return the element text of the named child converted to a long. |
long |
getLong(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a long. |
java.lang.String |
getName()
Return my name. |
java.lang.String |
getNamespace()
Return my namespace, or null if there is none. |
java.lang.String |
getNamespace(java.lang.String prefix)
Return the value of the namespace with the specified prefix, or null if there is none. |
java.lang.String |
getNamespacePrefix(java.lang.String namespace)
Return a prefix that maps to a particular namespace value, searching from the current element up through its parents. |
java.lang.String[] |
getNamespacePrefixes(java.lang.String namespace)
Return an array of all the prefixes that map to a particular namespace value, searching from the current element up through its parents. |
java.util.Dictionary |
getNamespaces()
Return namespaces declared directly on this element as a Dictionary of prefix -> value. |
java.lang.String |
getNamespaceURI()
Return the namespace URI of this node, or null if it is unspecified. |
java.lang.String |
getNodeName()
If there is a prefix, return prefix:name, otherwise return name. |
short |
getNodeType()
Return ELEMENT_NODE. |
Element |
getParentElement()
Return my parent element. |
static java.lang.String[] |
getParts(java.lang.String qualifiedName)
|
java.lang.String |
getPrefix()
Return my namespace prefix, or null if there is none. |
java.lang.String |
getPrefix(java.lang.String namespace)
|
java.lang.String |
getPrefix(java.lang.String namespace,
java.lang.String preferredPrefix)
|
java.lang.String |
getPrefixedQName(java.lang.String namespace,
java.lang.String name)
returns a prefixed qname (like xsd:string) given a namespace and a name, where the prefix is within the context of this element. |
java.lang.String |
getQName()
Return my qualified name. |
java.lang.String |
getQName(java.lang.String string)
Return the fully qualified version of the specified name, with any prefix expanded to the full namespace value. |
Element |
getRoot()
Return the root of my parent, or null if I have no parent. |
short |
getShort()
Return the element text converted to a short. |
short |
getShort(java.lang.String name)
Return the element text of the named child converted to a short. |
short |
getShort(java.lang.String namespace,
java.lang.String name)
Return the element text of the named child converted to a short. |
java.lang.String |
getString()
Return the trimmed string of my first Text node, or null if I have none. |
java.lang.String |
getString(java.lang.String name)
Return the trimmed string of my first Text node whose element has the specified name, or null if I have none. |
java.lang.String |
getString(java.lang.String namespace,
java.lang.String name)
Return the trimmed string of my first Text node whose element has the specified namespace and name, or null if I have none. |
java.lang.String |
getTagName()
|
Text |
getText()
Return my first Text node, or null if I have none. |
Text |
getText(IXPath xpath)
Return my first Text node whose element has the specified xpath, or null if I have none. |
Text |
getText(java.lang.String name)
Return my first Text node whose element has the specified name, or null if I have none. |
Text |
getText(java.lang.String namespace,
java.lang.String name)
Return my first Text node whose element has the specified namespace and name, or null if I have none. |
java.lang.String |
getTextString()
Return the string of my first Text node, or null if I have none. |
java.lang.String |
getTextString(IXPath xpath)
Return the string of my first Text node whose element has the specified xpath, or null if I have none. |
java.lang.String |
getTextString(java.lang.String name)
Return the string of my first Text node whose element has the specified name, or null if I have none. |
java.lang.String |
getTextString(java.lang.String namespace,
java.lang.String name)
Return the string of my first Text node whose element has the specified namespace and name, or null if I have none. |
java.lang.String |
getTrimTextString()
Return the trimmed string of my first Text node, or null if I have none. |
java.lang.String |
getTrimTextString(IXPath xpath)
Return the trimmed string of my first Text node whose element has the specified xpath, or null if I have none. |
java.lang.String |
getTrimTextString(java.lang.String name)
Return the trimmed string of my first Text node whose element has the specified name, or null if I have none. |
java.lang.String |
getTrimTextString(java.lang.String namespace,
java.lang.String name)
Return the trimmed string of my first Text node whose element has the specified namespace and name, or null if I have none. |
boolean |
hasAttribute(java.lang.String name)
|
boolean |
hasAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
|
boolean |
hasAttributes()
Return true if I have one or more Attributes. |
boolean |
hasName(java.lang.String name)
Return true if my name match the specified value. |
boolean |
hasName(java.lang.String namespace,
java.lang.String name)
Return true if my namespace and name match the specified values. |
boolean |
hasText()
Return true if I have at least one Text node. |
Element |
insertText(java.lang.String text)
Insert a Text node with the specified text. |
Element |
insertText(Text text)
Insert a Text node with the specified text. |
void |
read(NodeReader reader)
|
void |
readAttributes(NodeReader reader)
Parse my attributes from the specified NodeReader. |
void |
readChildren(NodeReader reader)
Parse my children from the specified NodeReader. |
Attribute |
removeAttribute(IXPath xpath)
Remove and return the attribute with the specified xpath, or return null if none was found. |
void |
removeAttribute(java.lang.String name)
Remove the attribute with the specified name if one exists. |
Attribute |
removeAttribute(java.lang.String namespace,
java.lang.String name)
Remove and return the attribute with the specified namespace and name, or return null if none was found. |
org.w3c.dom.Attr |
removeAttributeNode(org.w3c.dom.Attr oldAttr)
|
void |
removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
|
Attributes |
removeAttributes(IXPath xpath)
Remove and return the attributes with the specified xpath. |
boolean |
removeNamespace(java.lang.String prefix)
Remove the namespace with the specified prefix. |
Element |
setAttribute(Attribute attribute)
Add the specified attribute, overwriting any previous value if present. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Add an attribute with the specified name and value, overwriting any previous value if present. |
Element |
setAttribute(java.lang.String prefix,
java.lang.String name,
java.lang.String value)
Add an attribute with the specified namespace prefix, name and value, overwriting any previous value if present. |
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr newAttr)
|
org.w3c.dom.Attr |
setAttributeNodeNS(org.w3c.dom.Attr newAttr)
|
void |
setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String value)
|
void |
setBoolean(boolean value)
Set the element text to the specified value as a string. |
void |
setBoolean(java.lang.String name,
boolean value)
Set the element text to the specified value as a string. |
void |
setBoolean(java.lang.String prefix,
java.lang.String name,
boolean value)
Set the element text to the specified value as a string. |
void |
setByte(byte value)
Set the element text to the specified value as a string. |
void |
setByte(java.lang.String name,
byte value)
Set the element text to the specified value as a string. |
void |
setByte(java.lang.String prefix,
java.lang.String name,
byte value)
Set the element text to the specified value as a string. |
void |
setChar(char value)
Set the element text to the specified value as a string. |
void |
setChar(java.lang.String name,
char value)
Set the element text to the specified value as a string. |
void |
setChar(java.lang.String prefix,
java.lang.String name,
char value)
Set the element text to the specified value as a string. |
void |
setDouble(double value)
Set the element text to the specified value as a string. |
void |
setDouble(java.lang.String name,
double value)
Set the element text to the specified value as a string. |
void |
setDouble(java.lang.String prefix,
java.lang.String name,
double value)
Set the element text to the specified value as a string. |
void |
setFloat(float value)
Set the element text to the specified value as a string. |
void |
setFloat(java.lang.String name,
float value)
Set the element text to the specified value as a string. |
void |
setFloat(java.lang.String prefix,
java.lang.String name,
float value)
Set the element text to the specified value as a string. |
void |
setInt(int value)
Set the element text to the specified value as a string. |
void |
setInt(java.lang.String name,
int value)
Set the element text to the specified value as a string. |
void |
setInt(java.lang.String prefix,
java.lang.String name,
int value)
Set the element text to the specified value as a string. |
void |
setLong(long value)
Set the element text to the specified value as a string. |
void |
setLong(java.lang.String name,
long value)
Set the element text to the specified value as a string. |
void |
setLong(java.lang.String prefix,
java.lang.String name,
long value)
Set the element text to the specified value as a string. |
Element |
setName(java.lang.String name)
Set my name. |
Element |
setName(java.lang.String prefix,
java.lang.String name)
Set my name. |
void |
setName(java.lang.String prefix,
java.lang.String name,
java.lang.String namespace)
|
void |
setNamespace(java.lang.String prefix,
java.lang.String value)
Add a new namespace with the specified prefix and value, overwriting any previous value if present. |
Element |
setNextSibling(Element element)
Set my next sibling to the specified element. |
Element |
setNextSibling(java.lang.String name)
Set my next sibling to a new Element with the specified name. |
Element |
setNextSibling(java.lang.String prefix,
java.lang.String name)
Set my next sibling to a new Element with the specified namespace prefix and name. |
void |
setPrefix(java.lang.String prefix)
Set my namespace prefix to the specified value. |
Element |
setPreviousSibling(Element element)
Set my previous sibling to the specified element. |
Element |
setPreviousSibling(java.lang.String name)
Set my previous sibling to a new Element with the specified name. |
Element |
setPreviousSibling(java.lang.String prefix,
java.lang.String name)
Set my previous sibling to a new Element with the specified name. |
void |
setShort(short value)
Set the element text to the specified value as a string. |
void |
setShort(java.lang.String name,
short value)
Set the element text to the specified value as a string. |
void |
setShort(java.lang.String prefix,
java.lang.String name,
short value)
Set the element text to the specified value as a string. |
void |
setString(java.lang.String value)
If text is not null, set my first Text node to have the specified text, adding one if necessary. |
void |
setString(java.lang.String name,
java.lang.String value)
Apply setString( value ) to the named child, creating the child if necessary. |
void |
setString(java.lang.String prefix,
java.lang.String name,
java.lang.String value)
Apply setString( value ) to the named child, creating the child if necessary. |
Element |
setText(java.lang.String text)
If text is not null, set my first Text node to have the specified text, adding one if necessary. |
void |
setText(java.lang.String name,
java.lang.String text)
Apply setText( text ) to the named child, creating the child if necessary. |
void |
setText(java.lang.String prefix,
java.lang.String name,
java.lang.String text)
Apply setText( text ) to the named child, creating the child if necessary. |
Element |
setText(Text text)
If text is not null, set my first Text node to have the specified text, adding one if necessary. |
int |
size()
|
void |
write(NodeWriter writer)
Write myself to the specified writer starting at the specified indent level. |
void |
writeChildren(NodeWriter writer)
Write my children to the specified writer starting at the specified indent level. |
Methods inherited from class electric.xml.Child |
cloneNode, getByteArray, getByteArray, getByteArray, getBytes, getBytes, getBytes, getDocument, getNextSiblingChild, getOwnerDocument, getParent, getParentNode, getPreviousSiblingChild, replaceWith, setNextSiblingChild, setParent, setPreviousSiblingChild, toString, toString, write, write, write |
Methods inherited from class electric.xml.Node |
getNextSibling, getNextSiblingNode, getNode, getNode, getNodes, getNodeValue, getPreviousSibling, getPreviousSiblingNode, isSupported, normalize, remove, setNextSiblingNode, setNodeValue, setPreviousSiblingNode |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue |
Constructor Detail |
public Element()
public Element(java.lang.String name)
name
- The name.public Element(java.lang.String prefix, java.lang.String name, java.lang.String namespace)
name
- The prefix.namespace
- The namespace.public Element(Element element)
element
- The Element to copy.Method Detail |
public java.lang.Object clone()
clone
in class Child
public Element getRoot()
getRoot
in class Child
public Element getParentElement()
public java.lang.String getName()
getName
in interface INamed
public java.lang.String getQName()
public java.lang.String getPrefix()
getPrefix
in interface org.w3c.dom.Node
getPrefix
in class Node
public java.lang.String getPrefix(java.lang.String namespace)
namespace
- public java.lang.String getPrefix(java.lang.String namespace, java.lang.String preferredPrefix)
namespace
- preferredPrefix
- public java.lang.String getPrefixedQName(java.lang.String namespace, java.lang.String name)
namespace
- name
- public java.lang.String getNamespace()
getNamespace
in interface IQNamed
public Element setName(java.lang.String name)
name
- The new name value.
public Element setName(java.lang.String prefix, java.lang.String name) throws NamespaceException
prefix
- The namespace prefix.name
- The new name value.
NamespaceException
- If a namespace prefix could not be resolved.public void setName(java.lang.String prefix, java.lang.String name, java.lang.String namespace)
prefix
- name
- namespace
- public java.lang.String getQName(java.lang.String string) throws NamespaceException
string
- The original name.
NamespaceException
public boolean hasName(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public boolean hasName(java.lang.String name)
name
- The name.public boolean hasText()
public Text getText()
public Text getText(java.lang.String name)
name
- The name.public Text getText(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public Text getText(IXPath xpath)
xpath
- The XPath.public java.lang.String getTextString()
public java.lang.String getTextString(java.lang.String name)
name
- The name.public java.lang.String getTextString(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public java.lang.String getTextString(IXPath xpath)
xpath
- The XPath.public java.lang.String getTrimTextString()
public java.lang.String getTrimTextString(java.lang.String name)
name
- The name.public java.lang.String getTrimTextString(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public java.lang.String getTrimTextString(IXPath xpath)
xpath
- The XPath.public Element setText(java.lang.String text)
text
- The text.
public void setText(java.lang.String name, java.lang.String text)
name
- The child element name.text
- The text.public void setText(java.lang.String prefix, java.lang.String name, java.lang.String text)
prefix
- The namespace prefix.name
- The child element name.text
- The text.public Element setText(Text text)
text
- The Text.
public Element addText(java.lang.String text)
text
- The text.
public Element addText(Text text)
text
- The Text.
public Element insertText(java.lang.String text)
text
- The text.
public Element insertText(Text text)
text
- The Text.
public java.lang.String getString()
public java.lang.String getString(java.lang.String name)
name
- The name.public java.lang.String getString(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public void setString(java.lang.String value)
value
- The value.public void setString(java.lang.String name, java.lang.String value)
name
- The name of the child.value
- The text for the child.public void setString(java.lang.String prefix, java.lang.String name, java.lang.String value)
prefix
- The prefix of the child.name
- The name of the child.value
- The text for the child.public boolean getBoolean() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public boolean getBoolean(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public boolean getBoolean(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setBoolean(boolean value)
value
- public void setBoolean(java.lang.String name, boolean value)
name
- The child element name.value
- public void setBoolean(java.lang.String prefix, java.lang.String name, boolean value)
prefix
- The namespace prefix.name
- The child element name.value
- public byte getByte() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public byte getByte(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public byte getByte(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setByte(byte value)
value
- public void setByte(java.lang.String name, byte value)
name
- The child element name.value
- public void setByte(java.lang.String prefix, java.lang.String name, byte value)
prefix
- The namespace prefix.name
- The child element name.value
- public char getChar() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public char getChar(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public char getChar(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setChar(char value)
value
- public void setChar(java.lang.String name, char value)
name
- The child element name.value
- public void setChar(java.lang.String prefix, java.lang.String name, char value)
prefix
- The namespace prefix.name
- The child element name.value
- public short getShort() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public short getShort(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public short getShort(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setShort(short value)
value
- public void setShort(java.lang.String name, short value)
name
- The child element name.value
- public void setShort(java.lang.String prefix, java.lang.String name, short value)
prefix
- The namespace prefix.name
- The child element name.value
- public int getInt() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public int getInt(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public int getInt(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setInt(int value)
value
- public void setInt(java.lang.String name, int value)
name
- The child element name.value
- public void setInt(java.lang.String prefix, java.lang.String name, int value)
prefix
- The namespace prefix.name
- The child element name.value
- public long getLong() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public long getLong(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public long getLong(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setLong(long value)
value
- public void setLong(java.lang.String name, long value)
name
- The child element name.value
- public void setLong(java.lang.String prefix, java.lang.String name, long value)
prefix
- The namespace prefix.name
- The child element name.value
- public float getFloat() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public float getFloat(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public float getFloat(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setFloat(float value)
value
- public void setFloat(java.lang.String name, float value)
name
- The child element name.value
- public void setFloat(java.lang.String prefix, java.lang.String name, float value)
prefix
- The namespace prefix.name
- The child element name.value
- public double getDouble() throws java.lang.NumberFormatException
java.lang.NumberFormatException
- If an error occurs.public double getDouble(java.lang.String name) throws java.lang.NumberFormatException
name
- The name.
java.lang.NumberFormatException
- If an error occurs.public double getDouble(java.lang.String namespace, java.lang.String name) throws java.lang.NumberFormatException
namespace
- The namespace.name
- The name.
java.lang.NumberFormatException
- If an error occurs.public void setDouble(double value)
value
- public void setDouble(java.lang.String name, double value)
name
- The child element name.value
- public void setDouble(java.lang.String prefix, java.lang.String name, double value)
prefix
- The namespace prefix.name
- The child element name.value
- public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
hasAttributes
in class Node
public Attributes getAttributeObjects()
public Attribute getAttributeObject(java.lang.String name)
name
- The name.public Attribute getAttributeObject(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public Attribute getAttributeObject(IXPath xpath)
xpath
- The XPath.public Attributes getAttributes(IXPath xpath)
xpath
- The XPath.public java.lang.String getAttributeValue(java.lang.String name)
name
- The name.public java.lang.String getAttributeValue(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public java.lang.String getAttributeValue(IXPath xpath)
xpath
- The XPath.public void setAttribute(java.lang.String name, java.lang.String value)
setAttribute
in interface org.w3c.dom.Element
name
- The name.value
- The value.public Element setAttribute(java.lang.String prefix, java.lang.String name, java.lang.String value)
prefix
- The namespace prefix.name
- The name.value
- The value.
public Element setAttribute(Attribute attribute) throws NamespaceException
attribute
- The attribute.
NamespaceException
- If the attribute name could not be resolved.public void removeAttribute(java.lang.String name)
removeAttribute
in interface org.w3c.dom.Element
name
- The name.public Attribute removeAttribute(java.lang.String namespace, java.lang.String name)
namespace
- The namespace.name
- The name.public Attribute removeAttribute(IXPath xpath)
xpath
- The XPath.public Attributes removeAttributes(IXPath xpath)
xpath
- The XPath.public Element setNextSibling(java.lang.String name)
name
- The name.
public Element setNextSibling(java.lang.String prefix, java.lang.String name)
prefix
- The namespace prefix.name
- The name.
public Element setNextSibling(Element element)
element
- The element.
public Element setPreviousSibling(java.lang.String name)
name
- The name.
public Element setPreviousSibling(java.lang.String prefix, java.lang.String name)
prefix
- The namespace prefix.name
- The name.
public Element setPreviousSibling(Element element)
element
- The element.
public java.util.Dictionary getNamespaces()
public java.lang.String getNamespace(java.lang.String prefix)
getNamespace
in interface INamespaceContext
getNamespace
in class Parent
prefix
- The prefix.public java.lang.String getDefaultNamespace()
public java.lang.String getNamespacePrefix(java.lang.String namespace)
getNamespacePrefix
in class Parent
namespace
- The namespace to match.public java.lang.String[] getNamespacePrefixes(java.lang.String namespace)
namespace
- The namespace to match.protected void addNamespacePrefixes(java.lang.String namespace, java.util.Vector prefixes, java.util.Vector matches)
addNamespacePrefixes
in class Parent
namespace
- The namespace to matchprefixes
- All the prefixes so far.matches
- All the prefixes that matched.public void setNamespace(java.lang.String prefix, java.lang.String value) throws NamespaceException
setNamespace
in interface INamespaceContext
prefix
- The prefixvalue
- The value
NamespaceException
public boolean removeNamespace(java.lang.String prefix)
prefix
- The namespace to remove.public Element getElementWithId(java.lang.String value)
getElementWithId
in class Parent
value
- public java.util.Hashtable getIds()
public int size()
size
in class Parent
public void read(NodeReader reader) throws java.io.IOException, NamespaceException
read
in class Node
reader
-
java.io.IOException
NamespaceException
public void readAttributes(NodeReader reader) throws java.io.IOException, NamespaceException
reader
- The NodeReader.
java.io.IOException
- If an I/O exception occurs during parsing.
NamespaceException
- If a name could not be resolved.public void readChildren(NodeReader reader) throws java.io.IOException, NamespaceException
reader
- The NodeReader.
java.io.IOException
- If an I/O exception occurs.
NamespaceException
- If a name could not be resolved.public void write(NodeWriter writer) throws java.io.IOException
write
in class Node
writer
- The nodeWriter.
java.io.IOException
- If an I/O exception occurs.public void writeChildren(NodeWriter writer) throws java.io.IOException
writer
- The nodeWriter.
java.io.IOException
- If an I/O exception occurs.public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
getNodeType
in class Node
public java.lang.String getNodeName()
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class Node
public void setPrefix(java.lang.String prefix)
setPrefix
in interface org.w3c.dom.Node
setPrefix
in class Node
prefix
- The new namespace prefix.public java.lang.String getTagName()
getTagName
in interface org.w3c.dom.Element
public java.lang.String getLocalName()
Node
getLocalName
in interface org.w3c.dom.Node
getLocalName
in class Node
public java.lang.String getNamespaceURI()
Node
getNamespaceURI
in interface org.w3c.dom.Node
getNamespaceURI
in class Node
public org.w3c.dom.NamedNodeMap getAttributes()
Node
getAttributes
in interface org.w3c.dom.Node
getAttributes
in class Node
public boolean hasAttribute(java.lang.String name)
hasAttribute
in interface org.w3c.dom.Element
name
- public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface org.w3c.dom.Element
name
- The name.public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
getAttributeNode
in interface org.w3c.dom.Element
name
- public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
getAttributeNodeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
- public boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
hasAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
- public java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
getAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
- public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
getElementsByTagName
in interface org.w3c.dom.Element
name
- public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
getElementsByTagNameNS
in interface org.w3c.dom.Element
namespaceURI
- localName
- public void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
removeAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- localName
- public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
removeAttributeNode
in interface org.w3c.dom.Element
oldAttr
- public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
setAttributeNodeNS
in interface org.w3c.dom.Element
newAttr
- public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)
setAttributeNode
in interface org.w3c.dom.Element
newAttr
- public void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value)
setAttributeNS
in interface org.w3c.dom.Element
namespaceURI
- qualifiedName
- value
- public static java.lang.String[] getParts(java.lang.String qualifiedName)
qualifiedName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |