Interface Content

Content

A representation of a generic XML node.

Implementing classes

NameBrief description
CdataA representation of an XML CDATASection node.
CommentA representation of an XML Comment node.
DocTypeA representation of an XML DocumentType node.
ElementA representation of an XML Element node.
EntityRefA representation of an XML EntityReference node.
ProcessingInstructionA representation of an XML ProcessingInstruction node.
TextA representation of an XML Text node.

Methods

MethodReturn typeBrief description
asCdata()CdataCasts the node as a CDATASection node for the purposes of autocomplete.
asComment()CommentCasts the node as a Comment node for the purposes of autocomplete.
asDocType()DocTypeCasts the node as a DocumentType node for the purposes of autocomplete.
asElement()ElementCasts the node as an Element node for the purposes of autocomplete.
asEntityRef()EntityRefCasts the node as a EntityReference node for the purposes of autocomplete.
asProcessingInstruction()ProcessingInstructionCasts the node as a ProcessingInstruction node for the purposes of autocomplete.
asText()TextCasts the node as a Text node for the purposes of autocomplete.
detach()ContentDetaches the node from its parent Element node.
getParentElement()ElementGets the node's parent Element node.
getType()ContentTypeGets the node's content type.
getValue()StringGets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.

Detailed documentation

asCdata()

Casts the node as a CDATASection node for the purposes of autocomplete. If the node's ContentType is not already CDATA, this method returns null.

Return

Cdata — the CDATASection node


asComment()

Casts the node as a Comment node for the purposes of autocomplete. If the node's ContentType is not already COMMENT, this method returns null.

Return

Comment — the Comment node, or null if the node's content type is not COMMENT


asDocType()

Casts the node as a DocumentType node for the purposes of autocomplete. If the node's ContentType is not already DOCTYPE, this method returns null.

Return

DocType — the DocumentType node


asElement()

Casts the node as an Element node for the purposes of autocomplete. If the node's ContentType is not already ELEMENT, this method returns null.

Return

Element — the Element node


asEntityRef()

Casts the node as a EntityReference node for the purposes of autocomplete. If the node's ContentType is not already ENTITYREF, this method returns null.

Return

EntityRef — the EntityReference node


asProcessingInstruction()

Casts the node as a ProcessingInstruction node for the purposes of autocomplete. If the node's ContentType is not already PROCESSINGINSTRUCTION, this method returns null.

Return

ProcessingInstruction — the ProcessingInstruction node


asText()

Casts the node as a Text node for the purposes of autocomplete. If the node's ContentType is not already TEXT, this method returns null.

Return

Text — the Text node


detach()

Detaches the node from its parent Element node. If the node does not have a parent, this method has no effect.

Return

Content — the detached node


getParentElement()

Gets the node's parent Element node. If the node does not have a parent, this method returns null.

Return

Element — the parent Element node


getType()

Gets the node's content type.

Return

ContentType — the node's content type


getValue()

Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.

Return

String — the text value of all nodes that are direct or indirect children of the node