logo   XML - Metoder etc.




DOMmetoder

DOMDocument::


constructCreates a new DOMDocument object
createAttributeCreate new attribute
createAttributeNSCreate new attribute node with an associated namespace
createCDATASectionCreate new cdata node
createCommentCreate new comment node
createDocumentFragmentCreate new document fragment
createElementCreate new element node
createElementNSCreate new element node with an associated namespace
createEntityReferenceCreate new entity reference node
createProcessingInstructionCreates new PI node
createTextNodeCreate new text node
getElementByIdSearches for an element with a certain id
getElementsByTagNameSearches for all elements with given local tag name
getElementsByTagNameNSSearches for all elements with given tag name in specified namespace
importNodeImport node into current document
loadLoad XML from a file
loadHTMLLoad HTML from a string
loadHTMLFileLoad HTML from a file
loadXMLLoad XML from a string
normalizeDocumentNormalizes the document
registerNodeClassRegister extended class used to create base node type
relaxNGValidatePerforms relaxNG validation on the document
relaxeNGValidateSourcePerforms relaxNG validation on the document
saveDumps the internal XML tree back into a file
saveHTMLDumps the internal document into a string using HTML formatting
saveHTMLFileDumps the internal document into a file using HTML formatting
saveXMLDumps the internal XML tree back into a string
schemaVaslidateValidates a document based on a schema
schemaValidateSourceValidates a document based on a schema
validateValidates the document based on its DTD
xincludeSubstitutes XIncludes in a DOMDocument Object




DOM properties


actualEncodingDeprecated. Actual encoding of the document, is a readonly equivalent to encoding.
configDeprecated. Configuration used when DOMDocument::normalizeDocument() is invoked.
doctypeThe Document Type Declaration associated with this document.
documentElementThis is a convenience attribute that allows direct access to the child node that is the document element of the document.
documentURIThe location of the document or NULL if undefined.
encodingEncoding of the document, as specified by the XML declaration. This attribute is not present in the final DOM Level 3 specification, but is the only way of manipulating XML document encoding in this implementation.
formatOutputNicely formats output with indentation and extra space.
implemantationThe DOMImplementation object that handles this document.
preserveWhiteSpaceDo not remove redundant white space. Default to TRUE.
recoverProprietary. Enables recovery mode, i.e. trying to parse non-well formed documents. This attribute is not part of the DOM specification and is specific to libxml.
resolveExternalsSet it to TRUE to load external entities from a doctype declaration. This is useful for including character entities in your XML document.
standaloneDeprecated. Whether or not the document is standalone, as specified by the XML declaration, corresponds to xmlStandalone.
strictErrorCheckingThrows DOMException on errors. Default to TRUE.
substituteEntitiesProprietary. Whether or not to substitute entities. This attribute is not part of the DOM specification and is specific to libxml.
validateOnParseLoads and validates against the DTD. Default to FALSE.
versionDeprecated. Version of XML, corresponds to xmlVersion.
xmlEncodingAn attribute specifying, as part of the XML declaration, the encoding of this document. This is NULL when unspecified or when it is not known, such as when the Document was created in memory.
xmlStandaloneAn attribute specifying, as part of the XML declaration, whether this document is standalone. This is FALSE when unspecified.
xmlVersionAn attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if this document supports the "XML" feature, the value is "1.0"




DOMNode

DOMNode::


appendChildAdds new child at the end of the children
C14NCanonicalize nodes to a string
C14NFileCanonicalize nodes to a file
cloneNodeClones a node
getLineNoGet line number for a node
getNodePathGet an XPath for a node
hasAttributesChecks if node has attributes
hasChildNotesChecks if node has children
insertBeforeAdds a new child before a reference node
isDefaultNamespaceChecks if the specified namespaceURI is the default namespace or not
isSameNodeIndicates if two nodes are the same node
isSupportedChecks if feature is supported for specified version
lookupNamespaceURIGets the namespace URI of the node based on the prefix
lookupPrefixGets the namespace prefix of the node based on the namespace URI
normalizeNormalizes the node
removeChildRemoves child from list of children
replaceChildReplaces a child




















x
x