Class XmlEntityDecl
java.lang.Object
org.libxmq.imp.xml.XmlNode
org.libxmq.imp.xml.XmlEntityDecl
- All Implemented Interfaces:
XMQEntityDecl, XMQNode
An entity declaration in a dtd, eg <!ENTITY copy "©">
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intlibxml2 XML_EXTERNAL_GENERAL_PARSED_ENTITYstatic final intlibxml2 XML_EXTERNAL_GENERAL_UNPARSED_ENTITYstatic final intlibxml2 XML_EXTERNAL_PARAMETER_ENTITYstatic final intlibxml2 XML_INTERNAL_GENERAL_ENTITYstatic final intlibxml2 XML_INTERNAL_PARAMETER_ENTITYstatic final intlibxml2 XML_INTERNAL_PREDEFINED_ENTITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the text content of text like nodes (text, cdata, comment, pi).intetype()Returns the entity type.Returns the public id.orig()Returns the value as written in the source.systemId()Returns the system id.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, setContent, 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.voidsetContent(String content) Set the content of a text like node.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.
-
Field Details
-
INTERNAL_GENERAL
public static final int INTERNAL_GENERALlibxml2 XML_INTERNAL_GENERAL_ENTITY- See Also:
-
EXTERNAL_GENERAL_PARSED
public static final int EXTERNAL_GENERAL_PARSEDlibxml2 XML_EXTERNAL_GENERAL_PARSED_ENTITY- See Also:
-
EXTERNAL_GENERAL_UNPARSED
public static final int EXTERNAL_GENERAL_UNPARSEDlibxml2 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY- See Also:
-
INTERNAL_PARAMETER
public static final int INTERNAL_PARAMETERlibxml2 XML_INTERNAL_PARAMETER_ENTITY- See Also:
-
EXTERNAL_PARAMETER
public static final int EXTERNAL_PARAMETERlibxml2 XML_EXTERNAL_PARAMETER_ENTITY- See Also:
-
INTERNAL_PREDEFINED
public static final int INTERNAL_PREDEFINEDlibxml2 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
-
etype
public int etype()Returns the entity type.- Specified by:
etypein interfaceXMQEntityDecl- Returns:
- The libxml2 entity type number.
-
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. -
orig
Returns the value as written in the source.- Specified by:
origin interfaceXMQEntityDecl- Returns:
- The original literal or null.
-
externalId
Returns the public id.- Specified by:
externalIdin interfaceXMQEntityDecl- Returns:
- The external id or null.
-
systemId
Returns the system id.- Specified by:
systemIdin interfaceXMQEntityDecl- Returns:
- The system id or null.
-
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.
-