IMSEVimse 1.0
Draft

se.kth.cid.xml
Class XmlDocument

java.lang.Object
  |
  +--se.kth.cid.xml.XmlDocument

public class XmlDocument
extends Object

This class represents an XML document.

Version:
$Revision: 1.1.1.1 $
Author:
Mikael Nilsson

Constructor Summary
XmlDocument()
          Constructs an XmlDocument.
 
Method Summary
 String getProcessingInstruction(String piName)
           
 String[] getProcessingInstructions()
           
 String getPublicDTDId()
          Returns the public DTD ID.
 XmlElement getRoot()
          Gets the document root.
 String getSystemDTDId()
          Returns the system DTD ID.
 void setProcessingInstruction(String piName, String piData)
          Sets a processing instruction in the XML document.
 void setPublicDTDId(String npublicId)
          Sets the public DTD ID.
 void setRoot(XmlElement root)
          Sets the document root.
 void setSystemDTDId(String nsystemId)
          Sets the system DTD ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDocument

public XmlDocument()
Constructs an XmlDocument.
Method Detail

setRoot

public void setRoot(XmlElement root)
Sets the document root.
Parameters:
root - the document root.

getRoot

public XmlElement getRoot()
Gets the document root.
Returns:
the document root.

setPublicDTDId

public void setPublicDTDId(String npublicId)
                    throws XmlDocumentException
Sets the public DTD ID.
Parameters:
npublicId - the new public ID.
Throws:
XmlDocumentException - if npublicId is non-null but the system DTD ID is null.

getPublicDTDId

public String getPublicDTDId()
Returns the public DTD ID.
Returns:
the public DTD ID.

setSystemDTDId

public void setSystemDTDId(String nsystemId)
                    throws XmlDocumentException
Sets the system DTD ID.
Parameters:
nsystemId - the new system ID.
Throws:
XmlDocumentException - if nsystemId is null but the public DTD ID is non-null.

getSystemDTDId

public String getSystemDTDId()
Returns the system DTD ID.
Returns:
the system DTD ID.

setProcessingInstruction

public void setProcessingInstruction(String piName,
                                     String piData)
                              throws XmlDocumentException
Sets a processing instruction in the XML document. If piData is null, the processing instruction is removed.
Parameters:
piName - the name of the processing instruction.
pi - the data of the processing instruction.
Throws:
XmlDocumentException - if the PI was invalid.

getProcessingInstructions

public String[] getProcessingInstructions()

getProcessingInstruction

public String getProcessingInstruction(String piName)

IMSEVimse 1.0
Draft

Centre for user-oriented IT -design