Class XmlEntityDecl

java.lang.Object
org.libxmq.imp.xml.XmlNode
org.libxmq.imp.xml.XmlEntityDecl
All Implemented Interfaces:
XMQEntityDecl, XMQNode

public class XmlEntityDecl extends XmlNode implements XMQEntityDecl
An entity declaration in a dtd, eg <!ENTITY copy "&#169;">
  • Field Details

    • INTERNAL_GENERAL

      public static final int INTERNAL_GENERAL
      libxml2 XML_INTERNAL_GENERAL_ENTITY
      See Also:
    • EXTERNAL_GENERAL_PARSED

      public static final int EXTERNAL_GENERAL_PARSED
      libxml2 XML_EXTERNAL_GENERAL_PARSED_ENTITY
      See Also:
    • EXTERNAL_GENERAL_UNPARSED

      public static final int EXTERNAL_GENERAL_UNPARSED
      libxml2 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY
      See Also:
    • INTERNAL_PARAMETER

      public static final int INTERNAL_PARAMETER
      libxml2 XML_INTERNAL_PARAMETER_ENTITY
      See Also:
    • EXTERNAL_PARAMETER

      public static final int EXTERNAL_PARAMETER
      libxml2 XML_EXTERNAL_PARAMETER_ENTITY
      See Also:
    • INTERNAL_PREDEFINED

      public static final int INTERNAL_PREDEFINED
      libxml2 XML_INTERNAL_PREDEFINED_ENTITY
      See Also:
  • Constructor Details

    • XmlEntityDecl

      public XmlEntityDecl(String name, int etype, String external_id, String system_id, String content, String orig)
      Create an entity declaration.
      Parameters:
      name - The entity name.
      etype - The entity type, eg INTERNAL_GENERAL.
      external_id - The public id or null.
      system_id - The system id or null.
      content - The (expanded) content, or the notation name for unparsed entities.
      orig - The literal value as written, or null.
  • 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.
    • etype

      public int etype()
      Returns the entity type.
      Specified by:
      etype in interface XMQEntityDecl
      Returns:
      The libxml2 entity type number.
    • 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.
    • orig

      public String orig()
      Returns the value as written in the source.
      Specified by:
      orig in interface XMQEntityDecl
      Returns:
      The original literal or null.
    • externalId

      public String externalId()
      Returns the public id.
      Specified by:
      externalId in interface XMQEntityDecl
      Returns:
      The external id or null.
    • systemId

      public String systemId()
      Returns the system id.
      Specified by:
      systemId in interface XMQEntityDecl
      Returns:
      The system id or null.
    • 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.