Class XmlComment

java.lang.Object
org.libxmq.imp.xml.XmlNode
org.libxmq.imp.xml.XmlComment
All Implemented Interfaces:
XMQNode

public class XmlComment extends XmlNode
A comment node.
  • Constructor Details

    • XmlComment

      public XmlComment(String content)
      Create a comment.
      Parameters:
      content - The comment text, without the comment markers.
  • Method Details

    • type

      public XMQNodeType type()
      Description copied from class: XmlNode
      Returns the type of this node.
      Specified by:
      type in interface XMQNode
      Specified by:
      type in class XmlNode
      Returns:
      The node type.
    • content

      public String content()
      Description copied from class: XmlNode
      Returns the text content of text like nodes (text, cdata, comment, pi). Returns null for other nodes, use XmlNode.textContent() for the concatenated text of an element.
      Specified by:
      content in interface XMQNode
      Overrides:
      content in class XmlNode
      Returns:
      The content or null.
    • setContent

      public void setContent(String content)
      Description copied from class: XmlNode
      Set the content of a text like node. For an element, all children are replaced with a single text node, like libxml2 xmlNodeSetContent.
      Specified by:
      setContent in interface XMQNode
      Overrides:
      setContent in class XmlNode
      Parameters:
      content - The new content.
    • textContent

      public String textContent()
      Description copied from class: XmlNode
      Returns 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:
      textContent in interface XMQNode
      Overrides:
      textContent in class XmlNode
      Returns:
      The text content, never null.
    • fullName

      public String fullName()
      Description copied from class: XmlNode
      Returns the full name, ie prefix:name if the node has a namespace with a prefix.
      Specified by:
      fullName in interface XMQNode
      Overrides:
      fullName in class XmlNode
      Returns:
      The full name.