org.xmlpull.v1.builder.impl
Class XmlDocumentImpl

java.lang.Object
  extended by org.xmlpull.v1.builder.impl.XmlDocumentImpl
All Implemented Interfaces:
java.lang.Cloneable, XmlContainer, XmlDocument

public class XmlDocumentImpl
extends java.lang.Object
implements XmlDocument


Constructor Summary
XmlDocumentImpl(java.lang.String version, java.lang.Boolean standalone, java.lang.String characterEncoding)
           
 
Method Summary
 void addChild(java.lang.Object child)
           
 XmlComment addComment(java.lang.String content)
           
 XmlDoctype addDoctype(java.lang.String systemIdentifier, java.lang.String publicIdentifier)
          Method addDoctype
 XmlElement addDocumentElement(java.lang.String name)
           
 XmlElement addDocumentElement(XmlNamespace namespace, java.lang.String name)
           
 XmlNotation addNotation(java.lang.String name, java.lang.String systemIdentifier, java.lang.String publicIdentifier, java.lang.String declarationBaseUri)
          Method addNotation
 XmlProcessingInstruction addProcessingInstruction(java.lang.String target, java.lang.String content)
           
 Iterable children()
          An ordered list of child information items, in document order.
 java.lang.Object clone()
           
 XmlElement element(XmlNamespace n, java.lang.String name)
           
 XmlElement element(XmlNamespace namespace, java.lang.String name, boolean create)
           
 java.lang.String getBaseUri()
           
 java.lang.String getCharacterEncodingScheme()
           
 XmlElement getDocumentElement()
           
 java.lang.String getVersion()
           
 void insertChild(int pos, java.lang.Object child)
           
 boolean isAllDeclarationsProcessed()
           
 java.lang.Boolean isStandalone()
           
 XmlComment newComment(java.lang.String content)
           
 XmlDoctype newDoctype(java.lang.String systemIdentifier, java.lang.String publicIdentifier)
           
 XmlProcessingInstruction newProcessingInstruction(java.lang.String target, java.lang.String content)
           
 Iterable notations()
          An unordered set of notation information items, one for each notation declared in the DTD.
 void removeAllChildren()
           
 void removeAllNotations()
          Method removeAllNotations
 void removeAllUnparsedEntities()
           
 XmlElement requiredElement(XmlNamespace n, java.lang.String name)
           
 void setCharacterEncodingScheme(java.lang.String characterEncoding)
           
 void setDocumentElement(XmlElement rootElement)
           
 Iterable unparsedEntities()
          An unordered set of unparsed entity information items, one for each unparsed entity declared in the DTD.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDocumentImpl

public XmlDocumentImpl(java.lang.String version,
                       java.lang.Boolean standalone,
                       java.lang.String characterEncoding)
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface XmlDocument
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface XmlDocument

isStandalone

public java.lang.Boolean isStandalone()
Specified by:
isStandalone in interface XmlDocument

getCharacterEncodingScheme

public java.lang.String getCharacterEncodingScheme()
Specified by:
getCharacterEncodingScheme in interface XmlDocument

setCharacterEncodingScheme

public void setCharacterEncodingScheme(java.lang.String characterEncoding)
Specified by:
setCharacterEncodingScheme in interface XmlDocument

newProcessingInstruction

public XmlProcessingInstruction newProcessingInstruction(java.lang.String target,
                                                         java.lang.String content)
Specified by:
newProcessingInstruction in interface XmlDocument

addProcessingInstruction

public XmlProcessingInstruction addProcessingInstruction(java.lang.String target,
                                                         java.lang.String content)
Specified by:
addProcessingInstruction in interface XmlDocument

children

public Iterable children()
An ordered list of child information items, in document order. The list contains exactly one element information item. The list also contains one processing instruction information item for each processing instruction outside the document element, and one comment information item for each comment outside the document element. Processing instructions and comments within the DTD are excluded. If there is a document type declaration, the list also contains a document type declaration information item.

Specified by:
children in interface XmlDocument

removeAllUnparsedEntities

public void removeAllUnparsedEntities()
Specified by:
removeAllUnparsedEntities in interface XmlDocument

setDocumentElement

public void setDocumentElement(XmlElement rootElement)
Specified by:
setDocumentElement in interface XmlDocument

requiredElement

public XmlElement requiredElement(XmlNamespace n,
                                  java.lang.String name)
Specified by:
requiredElement in interface XmlDocument

element

public XmlElement element(XmlNamespace n,
                          java.lang.String name)
Specified by:
element in interface XmlDocument

element

public XmlElement element(XmlNamespace namespace,
                          java.lang.String name,
                          boolean create)
Specified by:
element in interface XmlDocument

insertChild

public void insertChild(int pos,
                        java.lang.Object child)
Specified by:
insertChild in interface XmlDocument

addComment

public XmlComment addComment(java.lang.String content)
Specified by:
addComment in interface XmlDocument

newDoctype

public XmlDoctype newDoctype(java.lang.String systemIdentifier,
                             java.lang.String publicIdentifier)
Specified by:
newDoctype in interface XmlDocument

unparsedEntities

public Iterable unparsedEntities()
An unordered set of unparsed entity information items, one for each unparsed entity declared in the DTD.

Specified by:
unparsedEntities in interface XmlDocument

removeAllChildren

public void removeAllChildren()
Specified by:
removeAllChildren in interface XmlDocument

newComment

public XmlComment newComment(java.lang.String content)
Specified by:
newComment in interface XmlDocument

removeAllNotations

public void removeAllNotations()
Method removeAllNotations

Specified by:
removeAllNotations in interface XmlDocument

addDoctype

public XmlDoctype addDoctype(java.lang.String systemIdentifier,
                             java.lang.String publicIdentifier)
Method addDoctype

Specified by:
addDoctype in interface XmlDocument

addChild

public void addChild(java.lang.Object child)
Specified by:
addChild in interface XmlDocument

addNotation

public XmlNotation addNotation(java.lang.String name,
                               java.lang.String systemIdentifier,
                               java.lang.String publicIdentifier,
                               java.lang.String declarationBaseUri)
Method addNotation

Specified by:
addNotation in interface XmlDocument

getBaseUri

public java.lang.String getBaseUri()
Specified by:
getBaseUri in interface XmlDocument

notations

public Iterable notations()
An unordered set of notation information items, one for each notation declared in the DTD.

Specified by:
notations in interface XmlDocument

addDocumentElement

public XmlElement addDocumentElement(java.lang.String name)
Specified by:
addDocumentElement in interface XmlDocument

addDocumentElement

public XmlElement addDocumentElement(XmlNamespace namespace,
                                     java.lang.String name)
Specified by:
addDocumentElement in interface XmlDocument

isAllDeclarationsProcessed

public boolean isAllDeclarationsProcessed()
Specified by:
isAllDeclarationsProcessed in interface XmlDocument

getDocumentElement

public XmlElement getDocumentElement()
Specified by:
getDocumentElement in interface XmlDocument