Class XmlPI
java.lang.Object
org.libxmq.imp.xml.XmlNode
org.libxmq.imp.xml.XmlPI
- All Implemented Interfaces:
XMQNode
A processing instruction, eg <?target data?>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the text content of text like nodes (text, cdata, comment, pi).voidsetContent(String content) Set the content of a text like node.Returns the string value of the node, like libxml2 xmlNodeGetContent.type()Returns the type of this node.Methods inherited from class XmlNode
addChild, addNextSibling, addPrevSibling, appendRaw, children, doc, firstChild, fullName, hasChildren, lastChild, line, name, next, numChildren, parent, prev, replaceWith, setLine, setName, toString, unlinkModifier and TypeMethodDescriptionAdd a child like libxml2 xmlAddChild.Insert a sibling after this node, like libxml2 xmlAddNextSibling (but without text merging).Insert a sibling before this node, like libxml2 xmlAddPrevSibling (but without text merging).Append a child without merging adjacent text nodes.children()Returns a new list with the children of this node.doc()Returns the document owning this node.Returns the first child.fullName()Returns the full name, ie prefix:name if the node has a namespace with a prefix.booleanReturns true if this node has children.Returns the last child.intline()Returns the source line of the node, like libxml2 xmlGetLineNo: elements get the line where their start tag ends, text the line where its first chunk was read, comments, processing instructions and cdata sections the line where they end.name()Returns the name of the node.next()Returns the next sibling.intCount the children.parent()Returns the parent node.prev()Returns the previous sibling.voidReplace this node with another node, like libxml2 xmlReplaceNode.voidsetLine(int line) Set the source line of the node.voidSet the name of the node.toString()voidunlink()Remove this node from its parent and siblings, like libxml2 xmlUnlinkNode.
-
Constructor Details
-
XmlPI
-
-
Method Details
-
type
-
content
Description copied from class:XmlNodeReturns the text content of text like nodes (text, cdata, comment, pi). Returns null for other nodes, useXmlNode.textContent()for the concatenated text of an element. -
setContent
Description copied from class:XmlNodeSet the content of a text like node. For an element, all children are replaced with a single text node, like libxml2 xmlNodeSetContent.- Specified by:
setContentin interfaceXMQNode- Overrides:
setContentin classXmlNode- Parameters:
content- The new content.
-
textContent
Description copied from class:XmlNodeReturns the string value of the node, like libxml2 xmlNodeGetContent. For an element this is the concatenation of all descendant text, where entity references contribute nothing (entities are never expanded implicitly) and character references kept as nodes their character.- Specified by:
textContentin interfaceXMQNode- Overrides:
textContentin classXmlNode- Returns:
- The text content, never null.
-