Interface XMQDtd
- All Superinterfaces:
XMQNode
A document type definition, the internal subset of a doctype. The children
are the declarations: entity declarations, element declarations, attribute
list declarations and notation declarations, plus the parameter entity
references kept as written.
-
Method Summary
Modifier and TypeMethodDescriptionAdd an entity declaration to the dtd.Returns the public id of the doctype, eg in <!Find an entity declaration by name.getParameterEntity(String name) Find a parameter entity declaration by name.booleanReturns true if the dtd has any declarations.systemId()Returns the system id of the doctype.Methods inherited from interface XMQNode
addChild, addNextSibling, addPrevSibling, appendRaw, children, content, doc, firstChild, fullName, lastChild, line, name, next, numChildren, parent, prev, replaceWith, setContent, setLine, setName, textContent, type, unlinkModifier and TypeMethodDescriptionAdd a child like xmqAddChild.Insert a sibling after this node, like xmqAddNextSibling (but without text merging).Insert a sibling before this node, like xmqAddPrevSibling (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.Returns the last child.intline()Returns the source line of the node, like xmqGetLineNumber: 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.intReturns the number of children.parent()Returns the parent node.prev()Returns the previous sibling.voidReplace this node with another node, like xmqReplaceNode.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 xmqGetString.type()Returns the type of this node.voidunlink()Remove this node from its parent and siblings, like xmqUnlinkNode.
-
Method Details
-
externalId
String externalId()Returns the public id of the doctype, eg in <!DOCTYPE library PUBLIC "libxmq" "xmq.dtd">.- Returns:
- The public id or null.
-
systemId
-
addEntity
Add an entity declaration to the dtd.- Parameters:
e- The entity declaration.- Returns:
- The entity declaration.
-
getEntity
Find an entity declaration by name.- Parameters:
name- The entity name.- Returns:
- The entity declaration or null.
-
getParameterEntity
Find a parameter entity declaration by name.- Parameters:
name- The parameter entity name.- Returns:
- The parameter entity declaration or null.
-
hasDeclarations
boolean hasDeclarations()Returns true if the dtd has any declarations.- Returns:
- True if there are entity, element, attribute or notation declarations.
-