All Implemented Interfaces:
IXmlElement, Serializable

public class XmlNewComment extends XmlNewAbstractSpecialElt implements IXmlElement
XML Comment node, used with DOM Generator to create a comment line. For more information, see the IXmlElement interface.
Since:
5.0
Author:
IdJ
See Also:
  • Constructor Details

    • XmlNewComment

      public XmlNewComment(String comment)
      create a comment element with the specified comment string as a value.
      Parameters:
      comment - The content of the XML comment.
      Throws:
      XmlGenerateException - when an exception occurs generating XML
  • Method Details

    • toXmlFragment

      public void toXmlFragment(boolean useIndentation, boolean sortAttribues, int level, StringBuffer str)
      Description copied from interface: IXmlElement
      Recursive conversion to an XML document. XML problem chars will be escaped (",<,>, etc). The XML code is appended to a stringbuffer. It uses indentation for pretty printing. Indentation starts at 0.
      Specified by:
      toXmlFragment in interface IXmlElement
      Specified by:
      toXmlFragment in class XmlNewAbstractElement
      Parameters:
      useIndentation - true to use whitespace indentation for pretty printing, false to avoid any whitespace between XML elements
      sortAttribues - true to use sort the attributes by name in alphabetic order.
      level - indentation level (tabs), start with 0 (unused if useIndentation is false)
      str - existing StringBuffer to append into
    • hasChildren

      protected boolean hasChildren()
      Specified by:
      hasChildren in class XmlNewAbstractElement
    • getNextSibling

      public IXmlElement getNextSibling()
      Description copied from interface: IXmlElement
      Return the node immediately following this node. If there is no such node, this returns null. This includes comment nodes, entity nodes, TEXT nodes etc. !!!!!
      Specified by:
      getNextSibling in interface IXmlElement
      Returns:
      the node immediately following this node. If there is no such node, this returns null.