| java.lang.Object org.kxml2.kdom.Node org.kxml2.kdom.Document
Document | public class Document extends Node (Code) | | The document consists of some legacy events and a single root
element. This class basically adds some consistency checks to
Node.
|
rootIndex | protected int rootIndex(Code) | | |
addChild | public void addChild(int index, int type, Object child)(Code) | | Adds a child at the given index position. Throws
an exception when a second root element is added
|
getEncoding | public String getEncoding()(Code) | | returns "#document"
|
getRootElement | public Element getRootElement()(Code) | | returns the root element of this document.
|
parse | public void parse(XmlPullParser parser) throws IOException, XmlPullParserException(Code) | | reads the document and checks if the last event
is END_DOCUMENT. If not, an exception is thrown.
The end event is consumed. For parsing partial
XML structures, consider using Node.parse ().
|
removeChild | public void removeChild(int index)(Code) | | |
write | public void write(XmlSerializer writer) throws IOException(Code) | | Writes this node to the given XmlWriter. For node and document,
this method is identical to writeChildren, except that the
stream is flushed automatically.
|
|
|