|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.exist.fluent.Resource org.exist.fluent.NamedResource org.exist.fluent.Document org.exist.fluent.XMLDocument
public class XMLDocument
An XML document from the database.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.exist.fluent.Document |
---|
Document.Event, Document.Listener, Document.ListenersFacet, Document.MetadataFacet |
Method Summary | |
---|---|
String |
contentsAsString()
Return the serialized contents of this XML document. |
XMLDocument |
copy(Folder destination,
Name name)
Copy this document to another collection, potentially changing the copy's name in the process. |
QueryService |
query()
Return a query service that executes queries in the context of this document. |
Node |
root()
Return the root element node of this document. |
String |
toString()
Return a string representation of the reference to this document. |
void |
write(OutputStream stream)
Serialize this document to the given output stream using the default encoding specified for the database. |
void |
write(Writer writer)
Serialize this document to the given writer. |
XMLDocument |
xml()
Return this XML document. |
Methods inherited from class org.exist.fluent.Document |
---|
delete, equals, export, folder, hashCode, length, listeners, metadata, move, name, path |
Methods inherited from class org.exist.fluent.Resource |
---|
database, namespaceBindings |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public XMLDocument xml()
xml
in class Document
public Node root()
public QueryService query()
query
in class Resource
public String toString()
toString
in class Document
public XMLDocument copy(Folder destination, Name name)
Document
copy
in class Document
destination
- the destination folder for the copyname
- the desired name for the copy
Name
public String contentsAsString()
contentsAsString
in class Document
Database.setDefaultCharacterEncoding(String)
public void write(OutputStream stream) throws IOException
write(Writer)
.
write
in class Document
stream
- the output stream to write to
IOException
- in case of problems with the encoding
DatabaseException
- in case of I/O problemsDatabase.setDefaultCharacterEncoding(String)
public void write(Writer writer)
writer
- destination writer
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |