public class XmlDeclaration extends LeafNode
Modifier and Type | Field and Description |
---|---|
private boolean |
isProcessingInstruction |
EmptyString, parentNode, siblingIndex
Constructor and Description |
---|
XmlDeclaration(java.lang.String name,
boolean isProcessingInstruction)
Create a new XML declaration
|
XmlDeclaration(java.lang.String name,
java.lang.String baseUri,
boolean isProcessingInstruction)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getWholeDeclaration()
Get the unencoded XML declaration.
|
private void |
getWholeDeclaration(java.lang.Appendable accum,
Document.OutputSettings out) |
java.lang.String |
name()
Get the name of this declaration.
|
java.lang.String |
nodeName()
Get the node name of this node.
|
(package private) void |
outerHtmlHead(java.lang.Appendable accum,
int depth,
Document.OutputSettings out)
Get the outer HTML of this node.
|
(package private) void |
outerHtmlTail(java.lang.Appendable accum,
int depth,
Document.OutputSettings out) |
java.lang.String |
toString()
Gets this node's outer HTML.
|
absUrl, attr, attr, attributes, baseUri, childNodeSize, coreValue, coreValue, doSetBaseUri, ensureChildNodes, hasAttr, hasAttributes, removeAttr
addChildren, addChildren, after, after, before, before, childNode, childNodes, childNodesAsArray, childNodesCopy, clearAttributes, clone, doClone, equals, filter, hasParent, hasSameValue, html, indent, nextSibling, nodelistChanged, outerHtml, outerHtml, ownerDocument, parent, parentNode, previousSibling, remove, removeChild, reparentChild, replaceChild, replaceWith, root, setBaseUri, setParentNode, setSiblingIndex, shallowClone, siblingIndex, siblingNodes, traverse, unwrap, wrap
public XmlDeclaration(java.lang.String name, boolean isProcessingInstruction)
name
- of declarationisProcessingInstruction
- is processing instructionpublic XmlDeclaration(java.lang.String name, java.lang.String baseUri, boolean isProcessingInstruction)
name
- of declarationbaseUri
- Leaf Nodes don't have base URIs; they inherit from their ElementisProcessingInstruction
- is processing instructionXmlDeclaration(String, boolean)
public java.lang.String nodeName()
Node
public java.lang.String name()
public java.lang.String getWholeDeclaration()
private void getWholeDeclaration(java.lang.Appendable accum, Document.OutputSettings out) throws java.io.IOException
java.io.IOException
void outerHtmlHead(java.lang.Appendable accum, int depth, Document.OutputSettings out) throws java.io.IOException
Node
outerHtmlHead
in class Node
accum
- accumulator to place HTML intojava.io.IOException
- if appending to the given accumulator fails.void outerHtmlTail(java.lang.Appendable accum, int depth, Document.OutputSettings out)
outerHtmlTail
in class Node
public java.lang.String toString()
Node
toString
in class Node
Node.outerHtml()