Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Document |
asW3cDocument()
This is equivalent to
asW3cDocument (null) . |
org.w3c.dom.Document |
asW3cDocument(javax.xml.parsers.DocumentBuilder docBuilder)
Returns a W3C Document object with this element() as the root node.
|
org.w3c.dom.Element |
asW3cElement()
This is equivalent to
asW3cElement (null) . |
org.w3c.dom.Element |
asW3cElement(javax.xml.parsers.DocumentBuilder docBuilder)
Returns a W3C Element object equivalent to this XdmElement.
|
asInputStream, asReader, getItemType, isCached, writeTo, writeTo
asString, getValueType
org.w3c.dom.Element asW3cElement(javax.xml.parsers.DocumentBuilder docBuilder) throws java.io.IOException, org.xml.sax.SAXException
Returns a W3C Element object equivalent to this XdmElement. Buffers the element() item from
the server and converts it to a W3C Element DOM object. The element() is buffered as a String
object. Subsequent calls will create a new DOM tree from the same String. The buffered String
may also be used by XdmValue.asString()
and XdmItem.asInputStream()
.
docBuilder
- The javax.xml.parsers.DocumentBuilder object to use to construct the Document. If
null, the default implementation will be used. See the JDK documentation for the
javax.xml.parsers.DocumentBuilderFactory class for details on configuring the
system default builder.java.lang.IllegalStateException
- If called after the InputStream has already been consumed.java.io.IOException
org.xml.sax.SAXException
XdmItem.asInputStream()
,
XdmValue.asString()
,
XdmItem.isCached()
,
XdmNode.asW3cNode()
org.w3c.dom.Element asW3cElement() throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
asW3cElement (null)
.javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
org.w3c.dom.Document asW3cDocument(javax.xml.parsers.DocumentBuilder docBuilder) throws java.io.IOException, org.xml.sax.SAXException
Returns a W3C Document object with this element() as the root node. Buffers the element()
item from the server and converts it to a W3C Element DOM object. The element() is buffered
as a String object. Subsequent calls will create a new DOM tree from the same String. The
buffered String may also be used by XdmValue.asString()
and XdmItem.asInputStream()
.
If you are using JDOM and want to create a JDOM Document for this node, do the following:
doc = new org.jdom.input.SAXBuilder().build (new StringReader (node.asString()))
docBuilder
- The javax.xml.parsers.DocumentBuilder object to use to construct the Document. If
null, the default implementation will be used. See the JDK documentation for the
javax.xml.parsers.DocumentBuilderFactory class for details on configuring the
system default builder.java.lang.IllegalStateException
- If called after the InputStream has already been consumed.java.io.IOException
org.xml.sax.SAXException
XdmItem.asInputStream()
,
XdmValue.asString()
,
XdmItem.isCached()
,
XdmNode.asW3cNode()
org.w3c.dom.Document asW3cDocument() throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
asW3cDocument (null)
.javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
Copyright © 2018 MarkLogic Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com