Class XmlDtd
java.lang.Object
org.libxmq.imp.xml.XmlNode
org.libxmq.imp.xml.XmlDtd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an element, attribute list or notation declaration.Add an entity declaration, like libxml2 xmlAddDocEntity.voidAdd a notation declaration.Returns the public id.Find a general entity declaration.getParameterEntity(String name) Find a parameter entity declaration.booleanReturns true if the dtd has any declarations, ie an internal subset.Returns the notation declarations.systemId()Returns the system id.type()Returns the type of this node.Methods inherited from class XmlNode
addChild, addNextSibling, addPrevSibling, appendRaw, children, content, doc, firstChild, fullName, hasChildren, lastChild, line, name, next, numChildren, parent, prev, replaceWith, setContent, setLine, setName, textContent, 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.content()Returns the text content of text like nodes (text, cdata, comment, pi).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.Returns the string value of the node, like libxml2 xmlNodeGetContent.toString()voidunlink()Remove this node from its parent and siblings, like libxml2 xmlUnlinkNode.
-
Constructor Details
-
XmlDtd
-
-
Method Details
-
type
-
externalId
Returns the public id.- Specified by:
externalIdin interfaceXMQDtd- Returns:
- The external id or null.
-
systemId
-
addEntity
Add an entity declaration, like libxml2 xmlAddDocEntity. A redeclared entity is ignored, the first declaration wins. -
addDecl
Add an element, attribute list or notation declaration.- Parameters:
d- The declaration.
-
addNotation
Add a notation declaration. Like in libxml2, notations are not children of the dtd, they are kept in a separate table and are printed before the other declarations.- Parameters:
d- The notation declaration.
-
notations
Returns the notation declarations.- Returns:
- The live list of notations.
-
getEntity
Find a general entity declaration. -
getParameterEntity
Find a parameter entity declaration.- Specified by:
getParameterEntityin interfaceXMQDtd- Parameters:
name- The entity name.- Returns:
- The declaration or null.
-
hasDeclarations
public boolean hasDeclarations()Returns true if the dtd has any declarations, ie an internal subset.- Specified by:
hasDeclarationsin interfaceXMQDtd- Returns:
- True if there are declarations.
-