Package org.jdom2.located
Class LocatedDocType
java.lang.Object
org.jdom2.Content
org.jdom2.DocType
org.jdom2.located.LocatedDocType
- All Implemented Interfaces:
Serializable,Cloneable,Located,NamespaceAware
An XML DOCTYPE declaration. Method allow the user to get and set the
root element name, public id, and system id.
- Author:
- Rolf Lear
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdom2.Content
Content.CType -
Field Summary
Fields inherited from class org.jdom2.DocType
elementName, internalSubset, publicID, systemID -
Constructor Summary
ConstructorsConstructorDescriptionLocatedDocType(String elementName) This will create theDocTypewith the specified element nameLocatedDocType(String elementName, String systemID) This will create theDocTypewith the specified element name and reference to an external DTD.LocatedDocType(String elementName, String publicID, String systemID) This will create theDocTypewith the specified element name and a reference to an external DTD. -
Method Summary
Methods inherited from class org.jdom2.DocType
clone, detach, getElementName, getInternalSubset, getParent, getPublicID, getSystemID, getValue, setElementName, setInternalSubset, setParent, setPublicID, setSystemID, toStringMethods inherited from class org.jdom2.Content
equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParentElement, hashCode
-
Constructor Details
-
LocatedDocType
This will create theDocTypewith the specified element name and a reference to an external DTD.- Parameters:
elementName-Stringname of element being constrained.publicID-Stringpublic ID of referenced DTDsystemID-Stringsystem ID of referenced DTD- Throws:
IllegalDataException- if the given system ID is not a legal system literal or the public ID is not a legal public ID.IllegalNameException- if the given root element name is not a legal XML element name.
-
LocatedDocType
This will create theDocTypewith the specified element name and reference to an external DTD.- Parameters:
elementName-Stringname of element being constrained.systemID-Stringsystem ID of referenced DTD- Throws:
IllegalDataException- if the given system ID is not a legal system literal.IllegalNameException- if the given root element name is not a legal XML element name.
-
LocatedDocType
This will create theDocTypewith the specified element name- Parameters:
elementName-Stringname of element being constrained.- Throws:
IllegalNameException- if the given root element name is not a legal XML element name.
-
-
Method Details
-
getLine
public int getLine()Description copied from interface:LocatedGet the line number -
getColumn
public int getColumn()Description copied from interface:LocatedGet the column (character on the line). -
setLine
public void setLine(int line) Description copied from interface:LocatedSet the line number -
setColumn
public void setColumn(int col) Description copied from interface:LocatedSet the column (character on the line).
-