Microsoft SDK for Java

Element Interface Methods

The Element interface contains the following methods:

addChild adds a child to this element.
getAttribute retrieves an attribute's value given its name.
getAttributes retrieves an enumeration for the element attributes.
getChild retrieves the child element by index.
getChildren returns an element collection of the children of this element.
getElements returns an enumeration of the children of this element.
getParent retrieves the parent of this element.
getTagName retrieves the name of the tag as a string.
getText returns the non—marked-up text contained by this element.
getType retrieves the type of the element.
numAttributes retrieves the number of attributes.
numElements retrieves the number of child elements.
removeAttribute deletes an attribute from an element.
removeChild removes a child element from the tree.
save saves this element.
setAttribute sets the attribute of this element.
setParent sets the parent of this element.
setText sets the text for this element.
toSchema returns the XML-DATA specification for the DTD element.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.