com.caucho.quercus.lib.dom
Class DOMDocument

java.lang.Object
  extended by com.caucho.quercus.lib.dom.DOMWrapper<T>
      extended by com.caucho.quercus.lib.dom.DOMNode<org.w3c.dom.Document>
          extended by com.caucho.quercus.lib.dom.DOMDocument

public class DOMDocument
extends DOMNode<org.w3c.dom.Document>


Method Summary
static DOMDocument __construct(Env env, java.lang.String version, java.lang.String encoding)
           
 DOMNode adoptNode(DOMNode source)
           
 DOMAttr createAttribute(java.lang.String name)
           
 DOMAttr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 DOMCDATASection createCDATASection(java.lang.String data)
           
 DOMComment createComment(java.lang.String data)
           
 DOMDocumentFragment createDocumentFragment()
           
 DOMElement createElement(java.lang.String tagName)
           
 DOMElement createElement(java.lang.String tagName, java.lang.String textContent)
           
 DOMElement createElementNS(java.lang.String namespaceURI, java.lang.String tagName)
           
 DOMElement createElementNS(java.lang.String namespaceURI, java.lang.String tagName, java.lang.String textContent)
           
 DOMEntityReference createEntityReference(java.lang.String name)
           
 DOMProcessingInstruction createProcessingInstruction(java.lang.String target)
           
 DOMProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
           
 DOMText createTextNode(java.lang.String data)
           
 DOMConfiguration getConfig()
           
 DOMDocumentType getDoctype()
           
 DOMElement getDocumentElement()
           
 java.lang.String getDocumentURI()
           
 DOMConfiguration getDomConfig()
           
 DOMElement getElementById(java.lang.String elementId)
           
 DOMNodeList getElementsByTagName(java.lang.String name)
           
 DOMNodeList getElementsByTagNameNS(java.lang.String uri, java.lang.String name)
           
 java.lang.String getEncoding()
           
 boolean getFormatOutput()
           
 DOMImplementation getImplementation()
           
 java.lang.String getInputEncoding()
           
 boolean getPreserveWhiteSpace()
           
 boolean getRecover()
           
 boolean getResolveExternals()
           
 boolean getStrictErrorChecking()
           
 boolean getSubstituteEntities()
           
 boolean getValidateOnParse()
           
 java.lang.String getVersion()
           
 java.lang.String getXmlEncoding()
           
 boolean getXmlStandalone()
           
 java.lang.String getXmlVersion()
           
 DOMNode importNode(DOMNode node)
           
 DOMNode importNode(DOMNode importedNode, boolean deep)
           
 boolean load(Env env, Path path, Value options)
           
 boolean loadHTML(Env env, java.lang.String source)
           
 boolean loadHTMLFile(Env env, Path path)
           
 boolean loadXML(Env env, StringValue source, Value options)
           
 void normalizeDocument()
           
 boolean relaxNGValidate(java.lang.String rngFilename)
           
 boolean relaxNGValidateSource(java.lang.String rngSource)
           
 DOMNode renameNode(DOMNode node, java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 Value save(Env env, Path path, Value options)
           
 StringValue saveHTML(Env env)
           
 Value saveHTMLFile(Env env, Path path)
           
 StringValue saveXML(Env env, DOMNode node, Value options)
           
 boolean schemaValidate(java.lang.String schemaFilename)
           
 boolean schemaValidateSource(java.lang.String schemaSource)
           
 void setDocumentURI(java.lang.String documentURI)
           
 void setEncoding(java.lang.String encoding)
           
 void setFormatOutput(boolean formatOutput)
           
 void setPreserveWhiteSpace(boolean preserveWhiteSpace)
           
 void setRecover(boolean recover)
           
 void setResolveExternals(boolean resolveExternals)
           
 void setStrictErrorChecking(boolean strictErrorChecking)
           
 void setSubstituteEntities(boolean substituteEntities)
           
 void setValidateOnParse(boolean validateOnParse)
           
 void setVersion(java.lang.String version)
           
 void setXmlStandalone(boolean xmlStandalone)
           
 void setXmlVersion(java.lang.String xmlVersion)
           
 boolean validate()
           
 int xinclude(Env env, Value options)
           
 
Methods inherited from class com.caucho.quercus.lib.dom.DOMNode
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, toString
 
Methods inherited from class com.caucho.quercus.lib.dom.DOMWrapper
getImpl, getImpl, wrap, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

__construct

public static DOMDocument __construct(Env env,
                                      java.lang.String version,
                                      java.lang.String encoding)

setVersion

public void setVersion(java.lang.String version)

getEncoding

public java.lang.String getEncoding()

setEncoding

public void setEncoding(java.lang.String encoding)

adoptNode

public DOMNode adoptNode(DOMNode source)
                  throws DOMException
Throws:
DOMException

createAttribute

public DOMAttr createAttribute(java.lang.String name)
                        throws DOMException
Throws:
DOMException

createAttributeNS

public DOMAttr createAttributeNS(java.lang.String namespaceURI,
                                 java.lang.String qualifiedName)
                          throws DOMException
Throws:
DOMException

createCDATASection

public DOMCDATASection createCDATASection(java.lang.String data)

createComment

public DOMComment createComment(java.lang.String data)

createDocumentFragment

public DOMDocumentFragment createDocumentFragment()

createElement

public DOMElement createElement(java.lang.String tagName)
                         throws DOMException
Throws:
DOMException

createElement

public DOMElement createElement(java.lang.String tagName,
                                java.lang.String textContent)
                         throws DOMException
Throws:
DOMException

createElementNS

public DOMElement createElementNS(java.lang.String namespaceURI,
                                  java.lang.String tagName)
                           throws DOMException
Throws:
DOMException

createElementNS

public DOMElement createElementNS(java.lang.String namespaceURI,
                                  java.lang.String tagName,
                                  java.lang.String textContent)
                           throws DOMException
Throws:
DOMException

createEntityReference

public DOMEntityReference createEntityReference(java.lang.String name)
                                         throws DOMException
Throws:
DOMException

createProcessingInstruction

public DOMProcessingInstruction createProcessingInstruction(java.lang.String target)
                                                     throws DOMException
Throws:
DOMException

createProcessingInstruction

public DOMProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                            java.lang.String data)
                                                     throws DOMException
Throws:
DOMException

createTextNode

public DOMText createTextNode(java.lang.String data)

getConfig

public DOMConfiguration getConfig()

getDoctype

public DOMDocumentType getDoctype()

getDocumentElement

public DOMElement getDocumentElement()

getDocumentURI

public java.lang.String getDocumentURI()

getDomConfig

public DOMConfiguration getDomConfig()

getElementById

public DOMElement getElementById(java.lang.String elementId)

getElementsByTagName

public DOMNodeList getElementsByTagName(java.lang.String name)

getElementsByTagNameNS

public DOMNodeList getElementsByTagNameNS(java.lang.String uri,
                                          java.lang.String name)

getFormatOutput

public boolean getFormatOutput()

getImplementation

public DOMImplementation getImplementation()

getInputEncoding

public java.lang.String getInputEncoding()

getPreserveWhiteSpace

public boolean getPreserveWhiteSpace()

getRecover

public boolean getRecover()

getResolveExternals

public boolean getResolveExternals()

getStrictErrorChecking

public boolean getStrictErrorChecking()

getSubstituteEntities

public boolean getSubstituteEntities()

getValidateOnParse

public boolean getValidateOnParse()

getVersion

public java.lang.String getVersion()

getXmlEncoding

public java.lang.String getXmlEncoding()

getXmlStandalone

public boolean getXmlStandalone()

getXmlVersion

public java.lang.String getXmlVersion()

importNode

public DOMNode importNode(DOMNode node)

importNode

public DOMNode importNode(DOMNode importedNode,
                          boolean deep)
                   throws DOMException
Throws:
DOMException

load

public boolean load(Env env,
                    Path path,
                    Value options)
             throws java.io.IOException
Throws:
java.io.IOException

loadHTML

public boolean loadHTML(Env env,
                        java.lang.String source)
Parameters:
source - A string containing the HTML

loadHTMLFile

public boolean loadHTMLFile(Env env,
                            Path path)

loadXML

public boolean loadXML(Env env,
                       StringValue source,
                       Value options)

normalizeDocument

public void normalizeDocument()

relaxNGValidate

public boolean relaxNGValidate(java.lang.String rngFilename)

relaxNGValidateSource

public boolean relaxNGValidateSource(java.lang.String rngSource)

renameNode

public DOMNode renameNode(DOMNode node,
                          java.lang.String namespaceURI,
                          java.lang.String qualifiedName)
                   throws DOMException
Throws:
DOMException

save

public Value save(Env env,
                  Path path,
                  Value options)
Returns:
the number of bytes written, or FALSE for an error

saveHTML

public StringValue saveHTML(Env env)

saveHTMLFile

public Value saveHTMLFile(Env env,
                          Path path)
Returns:
the number of bytes written, or FALSE for an error

saveXML

public StringValue saveXML(Env env,
                           DOMNode node,
                           Value options)
                    throws DOMException
Throws:
DOMException

schemaValidate

public boolean schemaValidate(java.lang.String schemaFilename)

schemaValidateSource

public boolean schemaValidateSource(java.lang.String schemaSource)

setDocumentURI

public void setDocumentURI(java.lang.String documentURI)

setFormatOutput

public void setFormatOutput(boolean formatOutput)

setPreserveWhiteSpace

public void setPreserveWhiteSpace(boolean preserveWhiteSpace)

setRecover

public void setRecover(boolean recover)

setResolveExternals

public void setResolveExternals(boolean resolveExternals)

setStrictErrorChecking

public void setStrictErrorChecking(boolean strictErrorChecking)

setSubstituteEntities

public void setSubstituteEntities(boolean substituteEntities)

setValidateOnParse

public void setValidateOnParse(boolean validateOnParse)

setXmlStandalone

public void setXmlStandalone(boolean xmlStandalone)
                      throws DOMException
Throws:
DOMException

setXmlVersion

public void setXmlVersion(java.lang.String xmlVersion)
                   throws DOMException
Throws:
DOMException

validate

public boolean validate()

xinclude

public int xinclude(Env env,
                    Value options)