Overview
Represents a DOM Element
Attribute Summary
name | type | description |
---|---|---|
Public | ||
attributes | Attribute[] |
Holds the node's attributes |
Protected |
Inherited Attributes
javafx.xml.Node
public | name | type |
---|---|---|
baseURI | String |
holds the nodes base URI |
children | Node[] |
Holds the children node to this node When a new child node is added, the parent node for the child node is set to this node. |
document | Document |
holds the associated document |
doIndent | Boolean |
indicates whether or not indenting should be used when printing or serializing. |
domNode | Node |
holds the associated dom node |
encoding | String |
indicates which encoding should be used when printing or serializing. |
indent | Integer |
Holds the number of spaces for indenting when printing or serializing. |
localName | String |
holds the node's local Nnme |
name | String |
holds the node's qualified name |
namespaceURI | String |
holds the node's namespace |
omitXMLDeclaration | Boolean |
indicates whether or not to include the xml declaration when printing or serializing. |
parent | Node |
Holds the parent node for this node. |
prefix | String |
holds the node's prefix |
standalone | Boolean |
indicates whether or not the document is standalone. |
type | NodeType |
holds the node's type |
value | String |
holds the node's value |
Function Summary
- public addAttribute(name: String, value: String, ) : Void
-
Adds an attribute
- public addAttributeNS(namespaceURI: String, qualifiedName: String, value: String, ) : Void
-
Adds an attribute
- public addComment(comment: String, ) : Node
-
add a comment to this element
- public addElement(name: String, ) : Element
-
add an element as a child to this element
- public addElementNS(namespaceURI: String, qualifiedName: String, ) : Element
-
add an element as a child to this element
- public addText(data: String, ) : Node
-
add data to this element
- public getAttribute(name: String, ) : String
-
Retrieves an attribute value by name.
- public removeAttribute(name: String, ) : Void
-
Removes an attribute by name.
- public setAttribute(name: String, value: String, ) : Void
-
Adds or updates an attribute
- public setAttributeNS(namespaceURI: String, qualifiedName: String, value: String, ) : Void
-
Adds or updates an attribute
- protected setDomNode(domNode: Node, ) : Void
-
set the associated properties from the dom Node
Inherited Functions
javafx.xml.Node
- protected createNode() : Node
-
create a default node based on this node's node type
- protected isChild(node: Node, ) : Boolean
-
determine whether the node's dom node is already a child of this dom node.
- public nomalize() : Void
-
normalize the node tree
- public query(query: String, ) : <any>[]
-
Perform an xpath query using this node as the root
- public queryBoolean(query: String, ) : Boolean
-
Perform an xpath query using this node as the root expecting a Boolean result
- public queryNode(query: String, ) : Node
-
Perform an xpath query using this node as the root expecting a Node result
- public queryNumber(query: String, ) : Number
-
Perform an xpath query using this node as the root expecting a Number result
- public queryString(query: String, ) : String
-
Perform an xpath query using this node as the root expecting a String result
- public serialize(writer: Writer, ) : Void
-
Convert this node to an XML format based on the attributes indent, doIndent, omitXMLDeclaration, encoding and standalone.
- protected setDomNode(domNode: Node, ) : Void
-
set the associated properties from the dom Node
- public toString() : String
-
Convert this node to an XML formatted string based on the attributes indent, doIndent, omitXMLDeclaration, encoding and standalone.
Attributes
public attributes: Attribute[]
Holds the node's attributes
Functions
public addAttribute(name: String, value: String, ):Void
-
Parameters
- name
- The name of the attribute.
- value
- the value for the attribute.
Adds an attribute
public addAttributeNS(namespaceURI: String, qualifiedName: String, value: String, ):Void
-
Parameters
- namespaceURI
- the namespace of the element
- qualifiedName
- the qualified name of the element
- value
- the value for the attribute.
Adds an attribute
public addComment(comment: String, ):Node
-
Parameters
- comment
- the comment
-
Returns
- Node
- the new Node
add a comment to this element
public addElement(name: String, ):Element
-
Parameters
- name
- the name of the element
-
Returns
- Element
- the new element
add an element as a child to this element
public addElementNS(namespaceURI: String, qualifiedName: String, ):Element
-
Parameters
- namespaceURI
- the namespace of the element
- qualifiedName
- the qualified name of the element
-
Returns
- Element
- the new element
add an element as a child to this element
public addText(data: String, ):Node
-
Parameters
- data
- the data
-
Returns
- Node
- the new Node
add data to this element
public getAttribute(name: String, ):String
-
Parameters
- name
- The name of the attribute to retrieve.
-
Returns
- String
- The <code>Attr</code> value as a string, or the empty string if that attribute does not have a specified or default value.
Retrieves an attribute value by name.
public removeAttribute(name: String, ):Void
-
Parameters
- name
- The name of the attribute to remove.
Removes an attribute by name.
public setAttribute(name: String, value: String, ):Void
-
Parameters
- name
- The name of the attribute.
- value
- the value for the attribute.
Adds or updates an attribute
public setAttributeNS(namespaceURI: String, qualifiedName: String, value: String, ):Void
-
Parameters
- namespaceURI
- the namespace of the element
- qualifiedName
- the qualified name of the element
- value
- the value for the attribute.
Adds or updates an attribute
protected setDomNode(domNode: Node, ):Void
-
Parameters
- domNode
- the dom node
set the associated properties from the dom Node