From d64096e0695687c8e453b8374a2d61b4ba37ab26 Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Sun, 9 May 2004 15:07:48 +0000 Subject: [PATCH] Initial cut of dom docs git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@158250 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/dom/constants.xml | 401 ++++++++++++++++++ reference/dom/functions/dom-domattr-isid.xml | 41 ++ .../dom-domcharacterdata-appenddata.xml | 41 ++ .../dom-domcharacterdata-deletedata.xml | 50 +++ .../dom-domcharacterdata-insertdata.xml | 46 ++ .../dom-domcharacterdata-replacedata.xml | 52 +++ .../dom-domcharacterdata-substringdata.xml | 49 +++ .../dom-domdocument-createattribute.xml | 52 +++ .../dom-domdocument-createattributens.xml | 57 +++ .../dom-domdocument-createcdatasection.xml | 53 +++ .../dom-domdocument-createcomment.xml | 53 +++ ...dom-domdocument-createdocumentfragment.xml | 45 ++ .../dom-domdocument-createelement.xml | 56 +++ .../dom-domdocument-createelementns.xml | 58 +++ .../dom-domdocument-createentityreference.xml | 53 +++ ...omdocument-createprocessinginstruction.xml | 53 +++ .../dom-domdocument-createtextnode.xml | 53 +++ .../dom-domdocument-getelementbyid.xml | 42 ++ .../dom-domdocument-getelementsbytagname.xml | 42 ++ ...dom-domdocument-getelementsbytagnamens.xml | 45 ++ .../functions/dom-domdocument-importnode.xml | 42 ++ .../dom/functions/dom-domdocument-load.xml | 68 +++ .../functions/dom-domdocument-loadhtml.xml | 68 +++ .../dom-domdocument-loadhtmlfile.xml | 68 +++ .../dom/functions/dom-domdocument-loadxml.xml | 67 +++ .../functions/dom-domdocument-normalize.xml | 41 ++ .../dom-domdocument-relaxngvalidate.xml | 48 +++ .../dom-domdocument-relaxngvalidatesource.xml | 48 +++ .../dom/functions/dom-domdocument-save.xml | 69 +++ .../functions/dom-domdocument-saveHTML.xml | 71 ++++ .../dom-domdocument-saveHTMLFile.xml | 69 +++ .../dom/functions/dom-domdocument-saveXML.xml | 70 +++ .../dom-domdocument-schemaValidate.xml | 48 +++ .../dom-domdocument-schemaValidateSource.xml | 48 +++ .../functions/dom-domdocument-validate.xml | 47 ++ .../functions/dom-domdocument-xinclude.xml | 41 ++ .../functions/dom-domelement-getattribute.xml | 44 ++ .../dom-domelement-getattributenode.xml | 43 ++ .../dom-domelement-getattributenodens.xml | 46 ++ .../dom-domelement-getattributens.xml | 45 ++ .../dom-domelement-getelementsbytagname.xml | 42 ++ .../dom-domelement-getelementsbytagnamens.xml | 43 ++ .../functions/dom-domelement-hasattribute.xml | 40 ++ .../dom-domelement-hasattributens.xml | 43 ++ .../dom-domelement-removeattribute.xml | 42 ++ .../dom-domelement-removeattributenode.xml | 43 ++ .../dom-domelement-removeattributens.xml | 44 ++ .../functions/dom-domelement-setattribute.xml | 62 +++ .../dom-domelement-setattributenode.xml | 43 ++ .../dom-domelement-setattributenodens.xml | 43 ++ .../dom-domelement-setattributens.xml | 49 +++ .../dom-domimplementation-createdocument.xml | 55 +++ ...m-domimplementation-createdocumenttype.xml | 52 +++ .../dom-domimplementation-hasfeature.xml | 42 ++ .../dom-domnamednodemap-getnameditem.xml | 41 ++ .../dom-domnamednodemap-getnameditemns.xml | 43 ++ .../functions/dom-domnamednodemap-item.xml | 40 ++ .../dom/functions/dom-domnode-appendchild.xml | 64 +++ .../dom/functions/dom-domnode-clonenode.xml | 43 ++ .../functions/dom-domnode-hasattributes.xml | 41 ++ .../functions/dom-domnode-haschildnodes.xml | 41 ++ .../functions/dom-domnode-insertbefore.xml | 49 +++ .../dom/functions/dom-domnode-issamenode.xml | 42 ++ .../dom/functions/dom-domnode-issupported.xml | 42 ++ .../dom-domnode-lookupnamespaceuri.xml | 41 ++ .../functions/dom-domnode-lookupprefix.xml | 41 ++ .../dom/functions/dom-domnode-normalize.xml | 41 ++ .../dom/functions/dom-domnode-removechild.xml | 45 ++ .../functions/dom-domnode-replacechild.xml | 48 +++ .../dom/functions/dom-domnodelist-item.xml | 42 ++ ...m-domtext-iswhitespaceinelementcontent.xml | 43 ++ .../dom/functions/dom-domtext-splittext.xml | 48 +++ .../dom/functions/dom-domxpath-query.xml | 48 +++ .../dom-domxpath-registernamespace.xml | 43 ++ reference/dom/reference.xml | 155 +++++++ 75 files changed, 4117 insertions(+) create mode 100644 reference/dom/constants.xml create mode 100644 reference/dom/functions/dom-domattr-isid.xml create mode 100644 reference/dom/functions/dom-domcharacterdata-appenddata.xml create mode 100644 reference/dom/functions/dom-domcharacterdata-deletedata.xml create mode 100644 reference/dom/functions/dom-domcharacterdata-insertdata.xml create mode 100644 reference/dom/functions/dom-domcharacterdata-replacedata.xml create mode 100644 reference/dom/functions/dom-domcharacterdata-substringdata.xml create mode 100644 reference/dom/functions/dom-domdocument-createattribute.xml create mode 100644 reference/dom/functions/dom-domdocument-createattributens.xml create mode 100644 reference/dom/functions/dom-domdocument-createcdatasection.xml create mode 100644 reference/dom/functions/dom-domdocument-createcomment.xml create mode 100644 reference/dom/functions/dom-domdocument-createdocumentfragment.xml create mode 100644 reference/dom/functions/dom-domdocument-createelement.xml create mode 100644 reference/dom/functions/dom-domdocument-createelementns.xml create mode 100644 reference/dom/functions/dom-domdocument-createentityreference.xml create mode 100644 reference/dom/functions/dom-domdocument-createprocessinginstruction.xml create mode 100644 reference/dom/functions/dom-domdocument-createtextnode.xml create mode 100644 reference/dom/functions/dom-domdocument-getelementbyid.xml create mode 100644 reference/dom/functions/dom-domdocument-getelementsbytagname.xml create mode 100644 reference/dom/functions/dom-domdocument-getelementsbytagnamens.xml create mode 100644 reference/dom/functions/dom-domdocument-importnode.xml create mode 100644 reference/dom/functions/dom-domdocument-load.xml create mode 100644 reference/dom/functions/dom-domdocument-loadhtml.xml create mode 100644 reference/dom/functions/dom-domdocument-loadhtmlfile.xml create mode 100644 reference/dom/functions/dom-domdocument-loadxml.xml create mode 100644 reference/dom/functions/dom-domdocument-normalize.xml create mode 100644 reference/dom/functions/dom-domdocument-relaxngvalidate.xml create mode 100644 reference/dom/functions/dom-domdocument-relaxngvalidatesource.xml create mode 100644 reference/dom/functions/dom-domdocument-save.xml create mode 100644 reference/dom/functions/dom-domdocument-saveHTML.xml create mode 100644 reference/dom/functions/dom-domdocument-saveHTMLFile.xml create mode 100644 reference/dom/functions/dom-domdocument-saveXML.xml create mode 100644 reference/dom/functions/dom-domdocument-schemaValidate.xml create mode 100644 reference/dom/functions/dom-domdocument-schemaValidateSource.xml create mode 100644 reference/dom/functions/dom-domdocument-validate.xml create mode 100644 reference/dom/functions/dom-domdocument-xinclude.xml create mode 100644 reference/dom/functions/dom-domelement-getattribute.xml create mode 100644 reference/dom/functions/dom-domelement-getattributenode.xml create mode 100644 reference/dom/functions/dom-domelement-getattributenodens.xml create mode 100644 reference/dom/functions/dom-domelement-getattributens.xml create mode 100644 reference/dom/functions/dom-domelement-getelementsbytagname.xml create mode 100644 reference/dom/functions/dom-domelement-getelementsbytagnamens.xml create mode 100644 reference/dom/functions/dom-domelement-hasattribute.xml create mode 100644 reference/dom/functions/dom-domelement-hasattributens.xml create mode 100644 reference/dom/functions/dom-domelement-removeattribute.xml create mode 100644 reference/dom/functions/dom-domelement-removeattributenode.xml create mode 100644 reference/dom/functions/dom-domelement-removeattributens.xml create mode 100644 reference/dom/functions/dom-domelement-setattribute.xml create mode 100644 reference/dom/functions/dom-domelement-setattributenode.xml create mode 100644 reference/dom/functions/dom-domelement-setattributenodens.xml create mode 100644 reference/dom/functions/dom-domelement-setattributens.xml create mode 100644 reference/dom/functions/dom-domimplementation-createdocument.xml create mode 100644 reference/dom/functions/dom-domimplementation-createdocumenttype.xml create mode 100644 reference/dom/functions/dom-domimplementation-hasfeature.xml create mode 100644 reference/dom/functions/dom-domnamednodemap-getnameditem.xml create mode 100644 reference/dom/functions/dom-domnamednodemap-getnameditemns.xml create mode 100644 reference/dom/functions/dom-domnamednodemap-item.xml create mode 100644 reference/dom/functions/dom-domnode-appendchild.xml create mode 100644 reference/dom/functions/dom-domnode-clonenode.xml create mode 100644 reference/dom/functions/dom-domnode-hasattributes.xml create mode 100644 reference/dom/functions/dom-domnode-haschildnodes.xml create mode 100644 reference/dom/functions/dom-domnode-insertbefore.xml create mode 100644 reference/dom/functions/dom-domnode-issamenode.xml create mode 100644 reference/dom/functions/dom-domnode-issupported.xml create mode 100644 reference/dom/functions/dom-domnode-lookupnamespaceuri.xml create mode 100644 reference/dom/functions/dom-domnode-lookupprefix.xml create mode 100644 reference/dom/functions/dom-domnode-normalize.xml create mode 100644 reference/dom/functions/dom-domnode-removechild.xml create mode 100644 reference/dom/functions/dom-domnode-replacechild.xml create mode 100644 reference/dom/functions/dom-domnodelist-item.xml create mode 100644 reference/dom/functions/dom-domtext-iswhitespaceinelementcontent.xml create mode 100644 reference/dom/functions/dom-domtext-splittext.xml create mode 100644 reference/dom/functions/dom-domxpath-query.xml create mode 100644 reference/dom/functions/dom-domxpath-registernamespace.xml create mode 100644 reference/dom/reference.xml diff --git a/reference/dom/constants.xml b/reference/dom/constants.xml new file mode 100644 index 0000000000..e8416541ea --- /dev/null +++ b/reference/dom/constants.xml @@ -0,0 +1,401 @@ + + +
+ &reftitle.constants; + &extension.constants; + + XML constants + + + + Constant + Value + Description + + + + + + XML_ELEMENT_NODE + (integer) + + 1 + Node is an element + + + + XML_ATTRIBUTE_NODE + (integer) + + 2 + Node is an attribute + + + + XML_TEXT_NODE + (integer) + + 3 + Node is a piece of text + + + + XML_CDATA_SECTION_NODE + (integer) + + 4 + + + + + XML_ENTITY_REF_NODE + (integer) + + 5 + + + + + XML_ENTITY_NODE + (integer) + + 6 + Node is an entity like   + + + + XML_PI_NODE + (integer) + + 7 + Node is a processing instruction + + + + XML_COMMENT_NODE + (integer) + + 8 + Node is a comment + + + + XML_DOCUMENT_NODE + (integer) + + 9 + Node is a document + + + + XML_DOCUMENT_TYPE_NODE + (integer) + + 10 + + + + + XML_DOCUMENT_FRAG_NODE + (integer) + + 11 + + + + + XML_NOTATION_NODE + (integer) + + 12 + + + + + XML_HTML_DOCUMENT_NODE + (integer) + + 13 + + + + + XML_DTD_NODE + (integer) + + 14 + + + + + XML_ELEMENT_DECL_NODE + (integer) + + 15 + + + + + XML_ATTRIBUTE_DECL_NODE + (integer) + + 16 + + + + + XML_ENTITY_DECL_NODE + (integer) + + 17 + + + + + XML_NAMESPACE_DECL_NODE + (integer) + + 18 + + + + + XML_ATTRIBUTE_CDATA + (integer) + + 1 + + + + + XML_ATTRIBUTE_ID + (integer) + + 2 + + + + + XML_ATTRIBUTE_IDREF + (integer) + + 3 + + + + + XML_ATTRIBUTE_IDREFS + (integer) + + 4 + + + + + XML_ATTRIBUTE_ENTITY + (integer) + + 5 + + + + + XML_ATTRIBUTE_NMTOKEN + (integer) + + 7 + + + + + XML_ATTRIBUTE_NMTOKENS + (integer) + + 8 + + + + + XML_ATTRIBUTE_ENUMERATION + (integer) + + 9 + + + + + XML_ATTRIBUTE_NOTATION + (integer) + + 10 + + + + +
+ + DOMException constants + + + + Constant + Value + Description + + + + + + DOM_INDEX_SIZE_ERR + (integer) + + 1 + + + + + DOMSTRING_SIZE_ERR + (integer) + + 2 + + + + + + DOM_HIERARCHY_REQUEST_ERR + (integer) + + 3 + + + + + DOM_WRONG_DOCUMENT_ERR + (integer) + + 4 + + + + + DOM_INVALID_CHARACTER_ERR + (integer) + + 5 + + + + + DOM_NO_DATA_ALLOWED_ERR + (integer) + + 6 + + + + + DOM_NO_MODIFICATION_ALLOWED_ERR + (integer) + + 7 + + + + + DOM_NOT_FOUND_ERR + (integer) + + 8 + + + + + DOM_NOT_SUPPORTED_ERR + (integer) + + 9 + + + + + DOM_INUSE_ATTRIBUTE_ERR + (integer) + + 10 + + + + + DOM_INVALID_STATE_ERR + (integer) + + 11 + + + + + DOM_SYNTAX_ERR + (integer) + + 12 + + + + + DOM_INVALID_MODIFICATION_ERR + (integer) + + 13 + + + + + DOM_NAMESPACE_ERR + (integer) + + 14 + + + + + DOM_INVALID_ACCESS_ERR + (integer) + + 15 + + + + + DOM_VALIDATION_ERR + (integer) + + 16 + + + + +
+
+ + + diff --git a/reference/dom/functions/dom-domattr-isid.xml b/reference/dom/functions/dom-domattr-isid.xml new file mode 100644 index 0000000000..590d423b4f --- /dev/null +++ b/reference/dom/functions/dom-domattr-isid.xml @@ -0,0 +1,41 @@ + + + + + DOMAttr->isId + + Checks if attribute is a defined ID + + + + Description + + boolDOMAttr->isId + + + + This function checks if the attribute is a defined ID. + + + + + diff --git a/reference/dom/functions/dom-domcharacterdata-appenddata.xml b/reference/dom/functions/dom-domcharacterdata-appenddata.xml new file mode 100644 index 0000000000..4066a316ec --- /dev/null +++ b/reference/dom/functions/dom-domcharacterdata-appenddata.xml @@ -0,0 +1,41 @@ + + + + + DOMCharacterData->appendData + + Append the string to the end of the character data of the node. + + + + Description + + voidDOMCharacterData->appendData + stringdata + + + Append the string data to the end of the character data of the node. + + + + + diff --git a/reference/dom/functions/dom-domcharacterdata-deletedata.xml b/reference/dom/functions/dom-domcharacterdata-deletedata.xml new file mode 100644 index 0000000000..b9d7b98a0c --- /dev/null +++ b/reference/dom/functions/dom-domcharacterdata-deletedata.xml @@ -0,0 +1,50 @@ + + + + + DOMCharacterData->deleteData + + Remove a range of characters from the node. + + + + Description + + voidDOMCharacterData->deleteData + intoffset + intcount + + + Deletes count characters starting from position + offset. If the sum of offset + and count exceeds the length, then all characters + to the end of the data are deleted. + + + Throws DOMExcpetion if offset + is negative or greater than the number of characters in data, or if + count is negative. + + + + + diff --git a/reference/dom/functions/dom-domcharacterdata-insertdata.xml b/reference/dom/functions/dom-domcharacterdata-insertdata.xml new file mode 100644 index 0000000000..90be384a86 --- /dev/null +++ b/reference/dom/functions/dom-domcharacterdata-insertdata.xml @@ -0,0 +1,46 @@ + + + + + DOMCharacterData->insertData + + Insert a string at the specified 16-bit unit offset. + + + + Description + + voidDOMCharacterData->insertData + intoffset + stringdata + + + Inserts string data at position offset. + + + Throws DOMExcpetion if offset + is negative or greater than the number of 16-bit units in data. + + + + + diff --git a/reference/dom/functions/dom-domcharacterdata-replacedata.xml b/reference/dom/functions/dom-domcharacterdata-replacedata.xml new file mode 100644 index 0000000000..1696e5d574 --- /dev/null +++ b/reference/dom/functions/dom-domcharacterdata-replacedata.xml @@ -0,0 +1,52 @@ + + + + + DOMCharacterData->replaceData + + Replace a substring within the DOMCharacterData node. + + + + Description + + voidDOMCharacterData->replaceData + intoffset + intcount + stringdata + + + Replace count characters starting from position + offset with data. If the + sum of offset and count + exceeds the length, then all characters to the end of the data are + replaced. + + + Throws DOMExcpetion if offset + is negative or greater than the number of characters in data, or if + count is negative. + + + + + diff --git a/reference/dom/functions/dom-domcharacterdata-substringdata.xml b/reference/dom/functions/dom-domcharacterdata-substringdata.xml new file mode 100644 index 0000000000..50d2afa230 --- /dev/null +++ b/reference/dom/functions/dom-domcharacterdata-substringdata.xml @@ -0,0 +1,49 @@ + + + + + DOMCharacterData->substringData + + Extracts a range of data from the node. + + + + Description + + stringDOMCharacterData->substringData + intoffset + intcount + + + Returns the specified substring. If the sum of offset + and count exceeds the length, then all 16-bit units + to the end of the data are returned. + + + Throws DOMExcpetion if offset + is negative or greater than the number of 16-bit units in data, or if + count is negative. + + + + + diff --git a/reference/dom/functions/dom-domdocument-createattribute.xml b/reference/dom/functions/dom-domdocument-createattribute.xml new file mode 100644 index 0000000000..3447bc14b1 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createattribute.xml @@ -0,0 +1,52 @@ + + + + + DOMDocument->createAttribute + Create new attribute + + + Description + + objectDOMDocument->createAttribute + stringname + + + This function returns a new instance of class DOMAttr. + The name of the attribute is the value of the first parameter. This node + will not show up in the document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMDocument->createElement(), + DOMNode->appendChild(), + DOMDocument->createTextNode(), + DOMDocument->createComment() and + DOMDocument->createProcessingInstruction(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createattributens.xml b/reference/dom/functions/dom-domdocument-createattributens.xml new file mode 100644 index 0000000000..71f0f8b6cb --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createattributens.xml @@ -0,0 +1,57 @@ + + + + + DOMDocument->createAttributeNS + + Create new attribute node with an associated namespace + + + + Description + + objectDOMDocument->createAttributeNS + stringnamespaceURI + stringqualifiedName + + + This function returns a new instance of class DOMAttr. + The tag name and prefix of the attribute is determined by the value of the + passed parameter qualifiedName. The URI of the + namespace is the value of namespaceURI. This node + will not show up in the document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMDocument->createElementNS(), + DOMNode->appendChild(), + DOMDocument->createElement(), + DOMDocument->createTextNode() and + DOMDocument->createAttribute(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createcdatasection.xml b/reference/dom/functions/dom-domdocument-createcdatasection.xml new file mode 100644 index 0000000000..02ef1e02b1 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createcdatasection.xml @@ -0,0 +1,53 @@ + + + + + DOMDocument->createCDATASection + Create new cdata node + + + Description + + objectDOMDocument->createCDATASection + stringdata + + + This function returns a new instance of class + DOMCDATASection. The content of the cdata is the + value of the passed parameter. This node will not show up in the + document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMNode->appendChild(), + DOMDocument->createElement(), + DOMDocument->createTextNode(), + DOMDocument->createAttribute(), + DOMDocument->createProcessingInstruction(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createcomment.xml b/reference/dom/functions/dom-domdocument-createcomment.xml new file mode 100644 index 0000000000..fdb4bbc57b --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createcomment.xml @@ -0,0 +1,53 @@ + + + + + DOMDocument->createComment + Create new comment node + + + Description + + objectDOMDocument->createComment + stringdata + + + This function returns a new instance of class + DOMComment. The content of the comment is the + value of the passed parameter. This node will not show up in the + document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMNode->appendChild(), + DOMDocument->createElement(), + DOMDocument->createTextNode(), + DOMDocument->createAttribute(), + DOMDocument->createProcessingInstruction(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createdocumentfragment.xml b/reference/dom/functions/dom-domdocument-createdocumentfragment.xml new file mode 100644 index 0000000000..5d63feaa7f --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createdocumentfragment.xml @@ -0,0 +1,45 @@ + + + + + DOMDocument->createDocumentFragment + Create new document fragment + + + Description + + objectDOMDocument->createDocumentFragment + + + + This function returns a new instance of class DOMAttr. + The name of the attribute is the value of the first parameter. This node + will not show up in the document unless it is inserted with e.g. + DOMNode->appendChild. + + + The return value is &false; if an error occurred. + + + + + diff --git a/reference/dom/functions/dom-domdocument-createelement.xml b/reference/dom/functions/dom-domdocument-createelement.xml new file mode 100644 index 0000000000..6807000702 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createelement.xml @@ -0,0 +1,56 @@ + + + + + DOMDocument->createElement + Create new element node + + + Description + + objectDOMDocument->createElement + stringname + stringvalue + + + This function returns a new instance of class + DOMElement. The tag name of the element is the + value of the name parameter. Optionally, a value for the new element may + also be passed in. This node will not show up in the document unless it + is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMDocument->createElementNS(), + DOMNode->appendChild(), + DOMDocument->createTextNode(), + DOMDocument->createComment(), + DOMDocument->createAttribute(), + DOMDocument->createProcessingInstruction(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createelementns.xml b/reference/dom/functions/dom-domdocument-createelementns.xml new file mode 100644 index 0000000000..59003a4ee2 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createelementns.xml @@ -0,0 +1,58 @@ + + + + + DOMDocument->createElementNS + + Create new element node with an associated namespace + + + + Description + + objectDomDocument->createElementNS + stringnamespaceURI + stringqualifiedName + + + This function returns a new instance of class + DOMElement. The tag name and prefix of the element + is determined by the value of the passed parameter qualifiedName. + The URI of the namespace is the value of the passed parameter + namespaceURI. This node will not show up in the + document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMNode->appendChild(), + DOMDocument->createAttributeNS(), + DOMDocument->createElement(), + DOMDocument->createAttribute() and + DOMDocument->createComment(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createentityreference.xml b/reference/dom/functions/dom-domdocument-createentityreference.xml new file mode 100644 index 0000000000..d1479e3ea3 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createentityreference.xml @@ -0,0 +1,53 @@ + + + + + DOMDocument->createEntityReference + Create new entity reference node + + + Description + + objectDOMDocument->createEntityReference + stringname + + + This function returns a new instance of class + DOMEntityReference. The content of the entity + reference is the + value of the passed parameter. This node will not show up in the + document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMNode->appendChild(), + DOMDocument->createElement(), + DOMDocument->createAttribute() and + DOMDocument->createComment(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createprocessinginstruction.xml b/reference/dom/functions/dom-domdocument-createprocessinginstruction.xml new file mode 100644 index 0000000000..630297314a --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createprocessinginstruction.xml @@ -0,0 +1,53 @@ + + + + + DOMDocument->createProcessingInstruction + Creates new PI node + + + Description + + objectDOMDocument->createProcessingInstruction + stringtarget + stringdata + + + This function returns a new instance of class + DOMProcessingInstruction. The content of the pi is the + value of the passed parameter. This node will not show up in the + document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMNode->appendChild(), + DOMDocument->createElement(), + DOMDocument->createAttribute() and + DOMDocument->createComment(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-createtextnode.xml b/reference/dom/functions/dom-domdocument-createtextnode.xml new file mode 100644 index 0000000000..07a69394ca --- /dev/null +++ b/reference/dom/functions/dom-domdocument-createtextnode.xml @@ -0,0 +1,53 @@ + + + + + DOMDocument->createTextNode + Create new text node + + + Description + + objectDOMDocument->createTextNode + stringcontent + + + This function returns a new instance of class + DOMText. The content of the text is the value of + the passed + parameter. This node will not show up in the + document unless it is inserted with e.g. + DOMNode->appendChild(). + + + The return value is &false; if an error occurred. + + + See also DOMNode->appendChild(), + DOMDocument->createElement(), + DOMDocument->createAttribute() and + DOMDocument->createComment(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-getelementbyid.xml b/reference/dom/functions/dom-domdocument-getelementbyid.xml new file mode 100644 index 0000000000..95705556c7 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-getelementbyid.xml @@ -0,0 +1,42 @@ + + + + + DOMDocument->getElementById + Searches for an element with a certain id. + + + Description + + objectDOMDocument->getElementById + stringelementId + + + This function is similar to + DOMDocument->getElementsByTagName() + but searches for an element with a given id. According to the DOM standard + this requires a DTD which defines the attribute ID to be of type ID. + + + + + diff --git a/reference/dom/functions/dom-domdocument-getelementsbytagname.xml b/reference/dom/functions/dom-domdocument-getelementsbytagname.xml new file mode 100644 index 0000000000..c051d4a42f --- /dev/null +++ b/reference/dom/functions/dom-domdocument-getelementsbytagname.xml @@ -0,0 +1,42 @@ + + + + + DOMDocument->getElementsByTagName + Searches for all elements with given tag name. + + + Description + + objectDOMDocument->getElementsByTagName + stringname + + + This function returns a new instance of class + DOMNodeList containing the elements with tagnames + matching the name parameter. Use "*" for the name to return all elements + within the document. + + + + + diff --git a/reference/dom/functions/dom-domdocument-getelementsbytagnamens.xml b/reference/dom/functions/dom-domdocument-getelementsbytagnamens.xml new file mode 100644 index 0000000000..8a5be3719d --- /dev/null +++ b/reference/dom/functions/dom-domdocument-getelementsbytagnamens.xml @@ -0,0 +1,45 @@ + + + + + DOMDocument->getElementsByTagNameNS + + Searches for all elements with given tag name in specified namespace. + + + + Description + + objectDOMDocument->getElementsByTagNameNS + stringnamespaceURI + stringlocalName + + + This function returns a new instance of class + DOMNodeList containing the elements with tagnames + matching the localName parameter and in the namespaceURI namespace. + Use "*" for the name to return all elements within the document. + + + + + diff --git a/reference/dom/functions/dom-domdocument-importnode.xml b/reference/dom/functions/dom-domdocument-importnode.xml new file mode 100644 index 0000000000..1229589683 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-importnode.xml @@ -0,0 +1,42 @@ + + + + + DOMDocument->importNode + Import node into current document. + + + Description + + objectDOMDocument->importNode + objectimportedNode + booldeep + + + This function returns a copy of the node to import and associates it with + the current document. DOMExcpetion is thrown if + node cannot be imported. + + + + + diff --git a/reference/dom/functions/dom-domdocument-load.xml b/reference/dom/functions/dom-domdocument-load.xml new file mode 100644 index 0000000000..e007fe879a --- /dev/null +++ b/reference/dom/functions/dom-domdocument-load.xml @@ -0,0 +1,68 @@ + + + + + DOMDocument->load + + Load XML from a file. + + + + Description + + mixedDOMDocument->load + stringfilename + + + The function parses the XML document in the file named + filename. This function may also be called + statically to load and create a DOMDocument object. + The static invocation may be used when no + DOMDocument properties need to be set prior to + loading. + + + + Creating a Document + +saveXML(); + +$doc = new DOMDocument(); +$doc->load("filename"); +print $doc->saveXML(); +?> +]]> + + + + + See also DOMDocument->loadXML(), + DOMDocument->save() and + DOMDocument->saveXML(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-loadhtml.xml b/reference/dom/functions/dom-domdocument-loadhtml.xml new file mode 100644 index 0000000000..531d323eee --- /dev/null +++ b/reference/dom/functions/dom-domdocument-loadhtml.xml @@ -0,0 +1,68 @@ + + + + + DOMDocument->loadHTML + + Load HTML from a string. + + + + Description + + mixedDOMDocument->loadHTML + stringsource + + + The function parses the HTML contained in the string source. + Unlike loading XML, HTML does not have to be well-formed to load. This + function may also be called statically to load and create a + DOMDocument object. The static invocation may be + used when no DOMDocument properties need to be + set prior to loading. + + + + Creating a Document + +Test
"); +print $doc->saveHTML(); + +$doc = new DOMDocument(); +$doc->loadHTML("Test
"); +print $doc->saveHTML(); +?> +]]> +
+
+
+ + See also DOMDocument->loadHTMLFile(), + DOMDocument->saveHTML() and + DOMDocument->saveHTMLFile(). + +
+
+ + diff --git a/reference/dom/functions/dom-domdocument-loadhtmlfile.xml b/reference/dom/functions/dom-domdocument-loadhtmlfile.xml new file mode 100644 index 0000000000..1ef7afa06b --- /dev/null +++ b/reference/dom/functions/dom-domdocument-loadhtmlfile.xml @@ -0,0 +1,68 @@ + + + + + DOMDocument->loadHTMLFile + + Load HTML from a file. + + + + Description + + mixedDOMDocument->loadHTMLFile + stringfilename + + + The function parses the HTML document in the file named + filename. Unlike loading XML, HTML does not have + to be well-formed to load.This function may also be called statically to + load and create a DOMDocument object. The static + invocation may be used when no DOMDocument + properties need to be set prior to loading. + + + + Creating a Document + +saveHTML(); + +$doc = new DOMDocument(); +$doc->loadHTMLFile("filename.html"); +print $doc->saveHTML(); +?> +]]> + + + + + See also DOMDocument->loadHTML(), + DOMDocument->saveHTML() and + DOMDocument->saveHTMLFile(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-loadxml.xml b/reference/dom/functions/dom-domdocument-loadxml.xml new file mode 100644 index 0000000000..bc8ddbdd46 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-loadxml.xml @@ -0,0 +1,67 @@ + + + + + DOMDocument->loadXML + + Load XML from a string. + + + + Description + + mixedDOMDocument->loadXML + stringsource + + + The function parses the XML contained in the string source. + This function may also be called statically to load and create a + DOMDocument object. The static invocation may be + used when no DOMDocument properties need to be + set prior to loading. + + + + Creating a Document + +"); +print $doc->saveXML(); + +$doc = new DOMDocument(); +$doc->loadXML(""); +print $doc->saveXML(); +?> +]]> + + + + + See also DOMDocument->load(), + DOMDocument->save() and + DOMDocument->saveXML(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-normalize.xml b/reference/dom/functions/dom-domdocument-normalize.xml new file mode 100644 index 0000000000..f24cb7097f --- /dev/null +++ b/reference/dom/functions/dom-domdocument-normalize.xml @@ -0,0 +1,41 @@ + + + + + DOMDocument->normalize + + Normalizes document. + + + + Description + + voidDOMDocument->normalize + + + + Normalizes document. + + + + + diff --git a/reference/dom/functions/dom-domdocument-relaxngvalidate.xml b/reference/dom/functions/dom-domdocument-relaxngvalidate.xml new file mode 100644 index 0000000000..1c4d30d0fa --- /dev/null +++ b/reference/dom/functions/dom-domdocument-relaxngvalidate.xml @@ -0,0 +1,48 @@ + + + + + DOMDocument->relaxNGValidate + + Performs relaxNG validation on the document. + + + + Description + + boolDOMDocument->relaxNGValidate + stringfilename + + + Performs relaxNG validation on the document based on the file defined by + filename. + + + See also DOMDocument->validate(), + DOMDocument->schemaValidate(), + DOMDocument->schemaValidateSource() + and DOMDocument->relaxNGValidateSource(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-relaxngvalidatesource.xml b/reference/dom/functions/dom-domdocument-relaxngvalidatesource.xml new file mode 100644 index 0000000000..502048a4ef --- /dev/null +++ b/reference/dom/functions/dom-domdocument-relaxngvalidatesource.xml @@ -0,0 +1,48 @@ + + + + + DOMDocument->relaxNGValidateSource + + Performs relaxNG validation on the document. + + + + Description + + boolDOMDocument->relaxNGValidateSource + stringsource + + + Performs relaxNG validation on the document based on the file defined in + string source. + + + See also DOMDocument->validate(), + DOMDocument->schemaValidate(), + DOMDocument->schemaValidateSource() + and DOMDocument->relaxNGValidate(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-save.xml b/reference/dom/functions/dom-domdocument-save.xml new file mode 100644 index 0000000000..169675569f --- /dev/null +++ b/reference/dom/functions/dom-domdocument-save.xml @@ -0,0 +1,69 @@ + + + + + DOMDocument->save + + Dumps the internal XML tree back into a file + + + + Description + + intDOMDocument->save + stringfilename + + + Creates an XML document from the dom representation. The number of bytes + written is returned. This function is usually called after building a new dom + document from scratch as in the example below. + + + + Creating a simple HTML document header + +createElement("HTML"); +$root = $doc->appendChild($root); +$head = $doc->createElement("HEAD"); +$head = $root->appendChild($head); +$title = $doc->createElement("TITLE"); +$title = $head->appendChild($title); +$text = $doc->createTextNode("This is the title"); +$text = $title->appendChild($text); +$doc->save("/tmp/test.xml"); +?> +]]> + + + + + See also DOMDocument->load(), + DOMDocument->loadXML() + and DOMDocument->saveXML(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-saveHTML.xml b/reference/dom/functions/dom-domdocument-saveHTML.xml new file mode 100644 index 0000000000..8de74694d9 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-saveHTML.xml @@ -0,0 +1,71 @@ + + + + + DOMDocument->saveHTML + + Dumps the internal document into a string using HTML formatting + + + + Description + + stringDOMDocument->saveHTML + + + + Creates an HTML document from the dom representation. This function + usually is called after building a new dom document from scratch + as in the example below. + + + + Creating a simple HTML document header + +createElement("HTML"); +$root = $doc->appendChild($root); +$head = $doc->createElement("HEAD"); +$head = $root->appendChild($head); +$title = $doc->createElement("TITLE"); +$title = $head->appendChild($title); +$text = $doc->createTextNode("This is the title"); +$text = $title->appendChild($text); +echo "
";
+echo $doc->saveHTML();
+echo "
"; +?> +]]> +
+
+
+ + See also DOMDocument->loadHTML(), + DOMDocument->loadHTMLFile() + and DOMDocument->saveHTMLFile(). + +
+
+ + diff --git a/reference/dom/functions/dom-domdocument-saveHTMLFile.xml b/reference/dom/functions/dom-domdocument-saveHTMLFile.xml new file mode 100644 index 0000000000..12f2295037 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-saveHTMLFile.xml @@ -0,0 +1,69 @@ + + + + + DOMDocument->saveHTMLFile + + Dumps the internal document back into a file using HTML formatting + + + + Description + + stringDOMDocument->saveHTMLFile + stringfilename + + + Creates an HTML document from the dom representation. This function + usually is called after building a new dom document from scratch + as in the example below. + + + + Creating a simple HTML document header + +createElement("HTML"); +$root = $doc->appendChild($root); +$head = $doc->createElement("HEAD"); +$head = $root->appendChild($head); +$title = $doc->createElement("TITLE"); +$title = $head->appendChild($title); +$text = $doc->createTextNode("This is the title"); +$text = $title->appendChild($text); +$doc->saveHTMLFile("/tmp/test.hmtl"); +?> +]]> + + + + + See also DOMDocument->loadHTML(), + DOMDocument->loadHTMLFile() + and DOMDocument->saveHTML(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-saveXML.xml b/reference/dom/functions/dom-domdocument-saveXML.xml new file mode 100644 index 0000000000..3b8dae485d --- /dev/null +++ b/reference/dom/functions/dom-domdocument-saveXML.xml @@ -0,0 +1,70 @@ + + + + + DOMDocument->saveXML + Dumps the internal XML tree back into a string + + + Description + + stringDOMDocument->saveXML + objectnode + + + Creates an XML document from the dom representation. This function is + usually called after building a new dom document from scratch + as in the example below. The + node is used to output only the node rather than the entire document. + + + + Creating a simple HTML document header + +createElement("HTML"); +$root = $doc->appendChild($root); +$head = $doc->createElement("HEAD"); +$head = $root->appendChild($head); +$title = $doc->createElement("TITLE"); +$title = $head->appendChild($title); +$text = $doc->createTextNode("This is the title"); +$text = $title->appendChild($text); +echo "
";
+echo htmlentities($doc->saveXML());
+echo "
"; +?> +]]> +
+
+
+ + See also DOMDocument->load(), + DOMDocument->loadXML() + and DOMDocument->save(). + +
+
+ + diff --git a/reference/dom/functions/dom-domdocument-schemaValidate.xml b/reference/dom/functions/dom-domdocument-schemaValidate.xml new file mode 100644 index 0000000000..b6052e6247 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-schemaValidate.xml @@ -0,0 +1,48 @@ + + + + + DOMDocument->schemaValidate + + Validates a document based on a schema. + + + + Description + + boolDOMDocument->schemaValidate + stringfilename + + + Validates a document based on a schema defined by + filename. + + + See also DOMDocument->schemaValidateSource(), + DOMDocument->relaxNGValidate(), + DOMDocument->relaxNGValidateSource() + and DOMDocument->validate(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-schemaValidateSource.xml b/reference/dom/functions/dom-domdocument-schemaValidateSource.xml new file mode 100644 index 0000000000..3fc9babd58 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-schemaValidateSource.xml @@ -0,0 +1,48 @@ + + + + + DOMDocument->schemaValidateSource + + Validates a document based on a schema. + + + + Description + + boolDOMDocument->schemaValidateSource + stringsource + + + Validates a document based on a schema defined in string + source. + + + See also DOMDocument->schemaValidate(), + DOMDocument->relaxNGValidate(), + DOMDocument->relaxNGValidateSource() + and DOMDocument->validate(),. + + + + + diff --git a/reference/dom/functions/dom-domdocument-validate.xml b/reference/dom/functions/dom-domdocument-validate.xml new file mode 100644 index 0000000000..fcb92d7f35 --- /dev/null +++ b/reference/dom/functions/dom-domdocument-validate.xml @@ -0,0 +1,47 @@ + + + + + DOMDocument->validate + + Validates the document based on its DTD. + + + + Description + + boolDOMDocument->validate + + + + Validates the document based on its DTD. + + + See also DOMDocument->schemaValidate(), + DOMDocument->schemaValidateSource(), + DOMDocument->relaxNGValidate(), + DOMDocument->relaxNGValidateSource(). + + + + + diff --git a/reference/dom/functions/dom-domdocument-xinclude.xml b/reference/dom/functions/dom-domdocument-xinclude.xml new file mode 100644 index 0000000000..600d9f069d --- /dev/null +++ b/reference/dom/functions/dom-domdocument-xinclude.xml @@ -0,0 +1,41 @@ + + + + + DOMDocument->xinclude + + Substitutes XIncludes in a DOMDocument Object. + + + + Description + + intDOMDocument->xinclude + + + + Substitutes XIncludes in a DOMDocument Object. + + + + + diff --git a/reference/dom/functions/dom-domelement-getattribute.xml b/reference/dom/functions/dom-domelement-getattribute.xml new file mode 100644 index 0000000000..32633702dd --- /dev/null +++ b/reference/dom/functions/dom-domelement-getattribute.xml @@ -0,0 +1,44 @@ + + + + + DOMElement->getAttribute + Returns value of attribute + + + Description + + stringDOMElement->getAttribute + stringname + + + Returns the value of the attribute with name name + for the current node. If no attribute with given name is found, an empty + string is returned. + + + See also DOMElement->setAttribute() + + + + + diff --git a/reference/dom/functions/dom-domelement-getattributenode.xml b/reference/dom/functions/dom-domelement-getattributenode.xml new file mode 100644 index 0000000000..61d5b13039 --- /dev/null +++ b/reference/dom/functions/dom-domelement-getattributenode.xml @@ -0,0 +1,43 @@ + + + + + DOMElement->getAttributeNode + Returns attribute node + + + Description + + objectDOMElement->getAttributeNode + objectname + + + Returns the attribute node with name name for the + current element. + + + See also DOMElement->setAttribute() + + + + + diff --git a/reference/dom/functions/dom-domelement-getattributenodens.xml b/reference/dom/functions/dom-domelement-getattributenodens.xml new file mode 100644 index 0000000000..06555c00ad --- /dev/null +++ b/reference/dom/functions/dom-domelement-getattributenodens.xml @@ -0,0 +1,46 @@ + + + + + DOMElement->getAttributeNodeNS + + Returns attribute node + + + + Description + + objectDOMElement->getAttributeNodeNS + stringnamespaceURI + stringlocalName + + + Returns the attribute node in namespace namespaceURI + with local name localName for the current node. + + + See also DOMElement->setAttributeNodeNS() + + + + + diff --git a/reference/dom/functions/dom-domelement-getattributens.xml b/reference/dom/functions/dom-domelement-getattributens.xml new file mode 100644 index 0000000000..5afce8e981 --- /dev/null +++ b/reference/dom/functions/dom-domelement-getattributens.xml @@ -0,0 +1,45 @@ + + + + + DOMElement->getAttributeNS + Returns value of attribute + + + Description + + stringDOMElement->getAttributeNS + stringnamespaceURI + stringlocalName + + + Returns the value of the attribute in namespace namespaceURI + with local name localName for the current node. + If no attribute with given name is found, an empty string is returned. + + + See also DOMElement->setAttributeNS() + + + + + diff --git a/reference/dom/functions/dom-domelement-getelementsbytagname.xml b/reference/dom/functions/dom-domelement-getelementsbytagname.xml new file mode 100644 index 0000000000..51493393ec --- /dev/null +++ b/reference/dom/functions/dom-domelement-getelementsbytagname.xml @@ -0,0 +1,42 @@ + + + + + DOMElement->getElementsByTagName + Gets elements by tagname + + + Description + + objectDOMElement->getElementsByTagName + stringname + + + This function returns a new instance of class + DOMNodeList containing the elements with tagnames + matching the name parameter. Use "*" for the name to return all elements + within the document. + + + + + diff --git a/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml b/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml new file mode 100644 index 0000000000..79678295cb --- /dev/null +++ b/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml @@ -0,0 +1,43 @@ + + + + + DOMElement->getElementsByTagNameNS + Get elements by namespaceURI and localName + + + Description + + objectDOMElement->getElementsByTagNameNS + stringnamespaceURI + stringlocalName + + + This function returns a new instance of class + DOMNodeList containing the elements in the + namespace namespaceURI having localName. + Use "*" for the name to return all elements within the document. + + + + + diff --git a/reference/dom/functions/dom-domelement-hasattribute.xml b/reference/dom/functions/dom-domelement-hasattribute.xml new file mode 100644 index 0000000000..6e7ef2c47d --- /dev/null +++ b/reference/dom/functions/dom-domelement-hasattribute.xml @@ -0,0 +1,40 @@ + + + + + DOMElement->hasAttribute + Checks to see if attribute exists + + + Description + + boolDOMElement->hasAttribute + stringname + + + Indicates wether attribute named name + exists as a member of the element. + + + + + diff --git a/reference/dom/functions/dom-domelement-hasattributens.xml b/reference/dom/functions/dom-domelement-hasattributens.xml new file mode 100644 index 0000000000..a7ef434e3a --- /dev/null +++ b/reference/dom/functions/dom-domelement-hasattributens.xml @@ -0,0 +1,43 @@ + + + + + DOMElement->hasAttributeNS + + Checks to see if attribute exists + + + + Description + + boolDOMElement->hasAttributeNS + stringnamespaceURI + stringlocalName + + + Indicates wether attribute in namespace namespaceURI + named localName exists as a member of the element. + + + + + diff --git a/reference/dom/functions/dom-domelement-removeattribute.xml b/reference/dom/functions/dom-domelement-removeattribute.xml new file mode 100644 index 0000000000..240380033f --- /dev/null +++ b/reference/dom/functions/dom-domelement-removeattribute.xml @@ -0,0 +1,42 @@ + + + + + DOMElement->removeAttribute + Removes attribute + + + Description + + boolDOMElement->removeAttribute + stringname + + + Removes attribute named name from the element. + + + Throws DOMExcpetion if node cannot be modified. + + + + + diff --git a/reference/dom/functions/dom-domelement-removeattributenode.xml b/reference/dom/functions/dom-domelement-removeattributenode.xml new file mode 100644 index 0000000000..a1822838e0 --- /dev/null +++ b/reference/dom/functions/dom-domelement-removeattributenode.xml @@ -0,0 +1,43 @@ + + + + + DOMElement->removeAttributeNode + Removes attribute + + + Description + + boolDOMElement->removeAttributeNode + objectoldnode + + + Removes attribute oldnode from the element. + + + Throws DOMExcpetion if node cannot be modified or + attribute is not a member of the element node. + + + + + diff --git a/reference/dom/functions/dom-domelement-removeattributens.xml b/reference/dom/functions/dom-domelement-removeattributens.xml new file mode 100644 index 0000000000..8a94e1dd70 --- /dev/null +++ b/reference/dom/functions/dom-domelement-removeattributens.xml @@ -0,0 +1,44 @@ + + + + + DOMElement->removeAttributeNS + Removes attribute + + + Description + + boolDOMElement->removeAttributeNS + stringnamespaceURI + stringlocalName + + + Removes attribute is namespace namespaceURI + named localName from the element. + + + Throws DOMExcpetion if node cannot be modified. + + + + + diff --git a/reference/dom/functions/dom-domelement-setattribute.xml b/reference/dom/functions/dom-domelement-setattribute.xml new file mode 100644 index 0000000000..c7247ef2d9 --- /dev/null +++ b/reference/dom/functions/dom-domelement-setattribute.xml @@ -0,0 +1,62 @@ + + + + + DOMElement->setAttribute + Adds new attribute + + + Description + + boolDOMElement->setAttribute + stringname + stringvalue + + + Sets an attribute with name name to the given + value. If the attribute does not exist, it will be created. + + + Throws DOMExcpetion if node cannot be modified. + + + + Setting an attribute + +createElement("para"); +$newnode = $doc->appendChild($node); +$newnode->setAttribute("align", "left"); +?> +]]> + + + + + See also DOMElement->getAttribute() + + + + + diff --git a/reference/dom/functions/dom-domelement-setattributenode.xml b/reference/dom/functions/dom-domelement-setattributenode.xml new file mode 100644 index 0000000000..36cfab2ea6 --- /dev/null +++ b/reference/dom/functions/dom-domelement-setattributenode.xml @@ -0,0 +1,43 @@ + + + + + DOMElement->setAttributeNode + Adds new attribute node to element + + + Description + + boolDOMElement->setAttributeNode + objectattr + + + Adds new attribute node attr to element. + Returns old node if attribute replaced. + + + Throws DOMExcpetion if node cannot be modified. + + + + + diff --git a/reference/dom/functions/dom-domelement-setattributenodens.xml b/reference/dom/functions/dom-domelement-setattributenodens.xml new file mode 100644 index 0000000000..10d02b0ad8 --- /dev/null +++ b/reference/dom/functions/dom-domelement-setattributenodens.xml @@ -0,0 +1,43 @@ + + + + + DOMElement->setAttributeNodeNS + Adds new attribute node to element + + + Description + + boolDOMElement->setAttributeNodeNS + objectattr + + + Adds new attribute node attr to element. + Returns old node if attribute replaced. + + + Throws DOMExcpetion if node cannot be modified. + + + + + diff --git a/reference/dom/functions/dom-domelement-setattributens.xml b/reference/dom/functions/dom-domelement-setattributens.xml new file mode 100644 index 0000000000..878f1b7515 --- /dev/null +++ b/reference/dom/functions/dom-domelement-setattributens.xml @@ -0,0 +1,49 @@ + + + + + DOMElement->setAttributeNS + Adds new attribute + + + Description + + voidDOMElement->setAttributeNS + stringnamespaceURI + stringqualifiedName + stringvalue + + + Sets an attribute with namespace namespaceURI and + name name to the given value. If the attribute + does not exist, it will be created. + + + Throws DOMExcpetion if node cannot be modified. + + + See also DOMElement->getAttributeNS() + + + + + diff --git a/reference/dom/functions/dom-domimplementation-createdocument.xml b/reference/dom/functions/dom-domimplementation-createdocument.xml new file mode 100644 index 0000000000..adc40f9a4d --- /dev/null +++ b/reference/dom/functions/dom-domimplementation-createdocument.xml @@ -0,0 +1,55 @@ + + + + + DOMImplementation->createDocument + + Creates a DOM Document object of the specified type with its document element. + + + + Description + + objectDOMImplementation->createDocument + stringnamespaceURI + stringqualifiedName + objectdoctype + + + Creates a DOMDocument object of the specified type with its document element. + If namespaceURI, qualifiedName, + and doctype are null, the returned DOMDocument is + empty with no document element + + + Throws DOMExcpetion if there is an error with the + namespace, as determined by namespaceURI and + qualifiedName, or if doctype + is not valid. + + + See also DOMImplementation->createDocumentType(). + + + + + diff --git a/reference/dom/functions/dom-domimplementation-createdocumenttype.xml b/reference/dom/functions/dom-domimplementation-createdocumenttype.xml new file mode 100644 index 0000000000..298e140e92 --- /dev/null +++ b/reference/dom/functions/dom-domimplementation-createdocumenttype.xml @@ -0,0 +1,52 @@ + + + + + DOMImplementation->createDocumentType + + Creates an empty DOMDocumentType object. + + + + Description + + objectDOMImplementation->createDocumentType + stringqualifiedName + stringpublicId + stringsystemId + + + Creates an empty DOMDocumentType object. Entity declarations and notations + are not made available. Entity reference expansions and default attribute + additions do not occur. + + + Throws DOMExcpetion if there is an error with the + namespace, as determined by qualifiedName. + + + See also DOMImplementation->createDocument(). + + + + + diff --git a/reference/dom/functions/dom-domimplementation-hasfeature.xml b/reference/dom/functions/dom-domimplementation-hasfeature.xml new file mode 100644 index 0000000000..f01e04ca14 --- /dev/null +++ b/reference/dom/functions/dom-domimplementation-hasfeature.xml @@ -0,0 +1,42 @@ + + + + + DOMImplementation->hasFeature + + Test if the DOM implementation implements a specific feature and version. + + + + Description + + boolDOMImplementation->hasFeature + stringfeature + stringversion + + + Test if the DOM implementation implements a specific feature and version. + + + + + diff --git a/reference/dom/functions/dom-domnamednodemap-getnameditem.xml b/reference/dom/functions/dom-domnamednodemap-getnameditem.xml new file mode 100644 index 0000000000..3b2eaf4c89 --- /dev/null +++ b/reference/dom/functions/dom-domnamednodemap-getnameditem.xml @@ -0,0 +1,41 @@ + + + + + DOMNamedNodeMap->getNamedItem + + Retrieves a node specified by name. + + + + Description + + objectDOMNamedNodeMap->getNamedItem + stringname + + + Retrieves a node specified by name. + + + + + diff --git a/reference/dom/functions/dom-domnamednodemap-getnameditemns.xml b/reference/dom/functions/dom-domnamednodemap-getnameditemns.xml new file mode 100644 index 0000000000..b1b497497a --- /dev/null +++ b/reference/dom/functions/dom-domnamednodemap-getnameditemns.xml @@ -0,0 +1,43 @@ + + + + + DOMNamedNodeMap->getNamedItemNS + + Retrieves a node specified by local name and namespace URI. + + + + Description + + objectDOMNamedNodeMap->getNamedItemNS + stringnamespaceURI + stringlocalName + + + Retrieves a node specified by localName and + namespaceURI. + + + + + diff --git a/reference/dom/functions/dom-domnamednodemap-item.xml b/reference/dom/functions/dom-domnamednodemap-item.xml new file mode 100644 index 0000000000..90413922d7 --- /dev/null +++ b/reference/dom/functions/dom-domnamednodemap-item.xml @@ -0,0 +1,40 @@ + + + + + DOMNamedNodeMap->item + Retrieves a node specified by index. + + + Description + + objectDOMNamedNodeMap->item + intindex + + + Retrieves a node specified by index within the + DOMNamedNodeMap object. + + + + + diff --git a/reference/dom/functions/dom-domnode-appendchild.xml b/reference/dom/functions/dom-domnode-appendchild.xml new file mode 100644 index 0000000000..195026bda0 --- /dev/null +++ b/reference/dom/functions/dom-domnode-appendchild.xml @@ -0,0 +1,64 @@ + + + + + DOMNode->appendChild + + Adds new child at the end of the children + + + + Description + + objectDOMNode->appendChild + objectnewnode + + + This functions appends a child to an existing list of children or creates + a new list of children. The child can be created with e.g. + DOMDocument->createElement(), + DOMDocument->createTextNode() + etc. or simply by using any other node. + + + Throws DOMException if node cannot be appended. + + + The following example will add a new element node to a fresh document. + + Adding a child + +createElement("para"); +$newnode = $doc->appendChild($node); +print $doc->saveXML(); +?> +]]> + + + + + + + diff --git a/reference/dom/functions/dom-domnode-clonenode.xml b/reference/dom/functions/dom-domnode-clonenode.xml new file mode 100644 index 0000000000..3416b525e4 --- /dev/null +++ b/reference/dom/functions/dom-domnode-clonenode.xml @@ -0,0 +1,43 @@ + + + + + DOMNode->cloneNode + + Clones a node + + + + Description + + objectDOMNode->cloneNode + booldeep + + + Creates a copy of the node. The paramter deep + indicates wether to copy all descedant nodes. This paramter is + defaulted to &false;. + + + + + diff --git a/reference/dom/functions/dom-domnode-hasattributes.xml b/reference/dom/functions/dom-domnode-hasattributes.xml new file mode 100644 index 0000000000..c5be575bbf --- /dev/null +++ b/reference/dom/functions/dom-domnode-hasattributes.xml @@ -0,0 +1,41 @@ + + + + + DOMNode->hasAttributes + + Checks if node has attributes + + + + Description + + boolDOMNode->hasAttributes + + + + This function checks if the node has attributes. + + + + + diff --git a/reference/dom/functions/dom-domnode-haschildnodes.xml b/reference/dom/functions/dom-domnode-haschildnodes.xml new file mode 100644 index 0000000000..3b3af86352 --- /dev/null +++ b/reference/dom/functions/dom-domnode-haschildnodes.xml @@ -0,0 +1,41 @@ + + + + + DOMNode->hasChildNodes + + Checks if node has children + + + + Description + + boolDOMNode->hasChildNodes + + + + This function checks if the node has children. + + + + + diff --git a/reference/dom/functions/dom-domnode-insertbefore.xml b/reference/dom/functions/dom-domnode-insertbefore.xml new file mode 100644 index 0000000000..5ed0686927 --- /dev/null +++ b/reference/dom/functions/dom-domnode-insertbefore.xml @@ -0,0 +1,49 @@ + + + + + DOMNode->insertBefore + + Adds new child at the end of the children + + + + Description + + objectDOMNode->insertBefore + objectnewnode + objectrefnode + + + This function inserts the new node newnode right + before the node refnode. The return value is the + inserted node. If you plan to do further modifications on the appended + child you must use the returned node. If refnode is not supplied then + newnode is appended to the children. + + + Throws DOMException if node cannot be inserted. + + + + + diff --git a/reference/dom/functions/dom-domnode-issamenode.xml b/reference/dom/functions/dom-domnode-issamenode.xml new file mode 100644 index 0000000000..2ea021ae8f --- /dev/null +++ b/reference/dom/functions/dom-domnode-issamenode.xml @@ -0,0 +1,42 @@ + + + + + DOMNode->isSameNode + + Indicates if two nodes are the same node. + + + + Description + + boolDOMNode->isSameNode + objectnode + + + This functions indicates if two nodes are the same node. + The comparison is NOT based on content + + + + + diff --git a/reference/dom/functions/dom-domnode-issupported.xml b/reference/dom/functions/dom-domnode-issupported.xml new file mode 100644 index 0000000000..9b19b918ac --- /dev/null +++ b/reference/dom/functions/dom-domnode-issupported.xml @@ -0,0 +1,42 @@ + + + + + DOMNode->isSupported + + Checks if feature is supported for specified version. + + + + Description + + boolDOMNode->isSupported + stringfeature + stringversion + + + Checks if feature is supported for specified version. + + + + + diff --git a/reference/dom/functions/dom-domnode-lookupnamespaceuri.xml b/reference/dom/functions/dom-domnode-lookupnamespaceuri.xml new file mode 100644 index 0000000000..d0e06d3496 --- /dev/null +++ b/reference/dom/functions/dom-domnode-lookupnamespaceuri.xml @@ -0,0 +1,41 @@ + + + + + DOMNode->lookupNamespaceURI + + Returns namespace URI of the node based on the prefix. + + + + Description + + stringDOMNode->lookupNamespaceURI + stringprefix + + + Returns namespace URI of the node based on the prefix. + + + + + diff --git a/reference/dom/functions/dom-domnode-lookupprefix.xml b/reference/dom/functions/dom-domnode-lookupprefix.xml new file mode 100644 index 0000000000..389d59fdaf --- /dev/null +++ b/reference/dom/functions/dom-domnode-lookupprefix.xml @@ -0,0 +1,41 @@ + + + + + DOMNode->lookupPrefix + + Returns name space prefix of the node based on namespaceURI. + + + + Description + + stringDOMNode->lookupPrefix + stringnamespaceURI + + + Returns name space prefix of the node based on namespaceURI. + + + + + diff --git a/reference/dom/functions/dom-domnode-normalize.xml b/reference/dom/functions/dom-domnode-normalize.xml new file mode 100644 index 0000000000..44ba7e6177 --- /dev/null +++ b/reference/dom/functions/dom-domnode-normalize.xml @@ -0,0 +1,41 @@ + + + + + DOMNode->normalize + + Normalizes the node. + + + + Description + + voidDOMNode->normalize + + + + Normalizes the node. + + + + + diff --git a/reference/dom/functions/dom-domnode-removechild.xml b/reference/dom/functions/dom-domnode-removechild.xml new file mode 100644 index 0000000000..ee2ea722c6 --- /dev/null +++ b/reference/dom/functions/dom-domnode-removechild.xml @@ -0,0 +1,45 @@ + + + + + DOMNode->removeChild + + Removes child from list of children + + + + Description + + objectDOMNode->removeChild + objectoldchild + + + This functions removes a child from a list of children. + If the child could be removed the functions returns the old child. + + + Throws DOMException if node cannot be removed. + + + + + diff --git a/reference/dom/functions/dom-domnode-replacechild.xml b/reference/dom/functions/dom-domnode-replacechild.xml new file mode 100644 index 0000000000..a3072348e4 --- /dev/null +++ b/reference/dom/functions/dom-domnode-replacechild.xml @@ -0,0 +1,48 @@ + + + + + DOMNode->replaceChild + + Replaces a child + + + + Description + + objectDOMNode->replaceChild + objectoldnode + objectnewnode + + + This function replaces the child oldnode + with the passed new node. If the new node is already a child it + will not be added a second time.If the replacement succeeds the old node + is returned. + + + Throws DOMException if node cannot be replaced. + + + + + diff --git a/reference/dom/functions/dom-domnodelist-item.xml b/reference/dom/functions/dom-domnodelist-item.xml new file mode 100644 index 0000000000..8897a2a871 --- /dev/null +++ b/reference/dom/functions/dom-domnodelist-item.xml @@ -0,0 +1,42 @@ + + + + + DOMNodelist->item + + Retrieves a node specified by index. + + + + Description + + objectDOMNodelist->item + intindex + + + Retrieves a node specified by index within the + DOMNodelist object. + + + + + diff --git a/reference/dom/functions/dom-domtext-iswhitespaceinelementcontent.xml b/reference/dom/functions/dom-domtext-iswhitespaceinelementcontent.xml new file mode 100644 index 0000000000..eb66e096d1 --- /dev/null +++ b/reference/dom/functions/dom-domtext-iswhitespaceinelementcontent.xml @@ -0,0 +1,43 @@ + + + + + DOMText->isWhitespaceInElementContent + + Indicates whether this text node contains whitespace. + + + + Description + + boolDOMText->isWhitespaceInElementContent + + + + Indicates whether this text node contains whitespace. The text node is + determined to contain whitespace in element content during the load of the + document. + + + + + diff --git a/reference/dom/functions/dom-domtext-splittext.xml b/reference/dom/functions/dom-domtext-splittext.xml new file mode 100644 index 0000000000..73a68b0c89 --- /dev/null +++ b/reference/dom/functions/dom-domtext-splittext.xml @@ -0,0 +1,48 @@ + + + + + DOMText->splitText + + Breaks this node into two nodes at the specified offset. + + + + Description + + objectDOMText->splitText + intoffset + + + Breaks this node into two nodes at the specified offset, + keeping both in the tree as siblings. After being split, this node will + contain all the content up to the offset. A new + node of the same type, which contains all the content at and after the + offset, is returned. If the original node had a + parent node, the new node is inserted as the next sibling of the original + node. When the offset is equal to the length of + this node, the new node has no data. + + + + + diff --git a/reference/dom/functions/dom-domxpath-query.xml b/reference/dom/functions/dom-domxpath-query.xml new file mode 100644 index 0000000000..5c0de7fd53 --- /dev/null +++ b/reference/dom/functions/dom-domxpath-query.xml @@ -0,0 +1,48 @@ + + + + + DOMXPath->query + + Evaluates the XPath expression in the given string + + + + Description + + objectDOMXPath->query + stringexpression + objectcontextnode + + + Returns a DOMNodelist containing all nodes matching + expression. Any expression which do not return + nodes will return an empty DOMNodelist. + + + The optional contextnode can be specified for doing + relative XPath queries. + + + + + diff --git a/reference/dom/functions/dom-domxpath-registernamespace.xml b/reference/dom/functions/dom-domxpath-registernamespace.xml new file mode 100644 index 0000000000..da24294004 --- /dev/null +++ b/reference/dom/functions/dom-domxpath-registernamespace.xml @@ -0,0 +1,43 @@ + + + + + DOMXPath->registerNamespace + + Registers the namespace with the DOMXpath object. + + + + Description + + boolDOMXPath->registerNamespace + stringprefix + stringnamespaceURI + + + Registers the namespaceURI and + prefix with the DOMXpath object. + + + + + diff --git a/reference/dom/reference.xml b/reference/dom/reference.xml new file mode 100644 index 0000000000..e04a9331e0 --- /dev/null +++ b/reference/dom/reference.xml @@ -0,0 +1,155 @@ + + + + DOM Functions + DOM + + +
+ &reftitle.intro; + + The DOM extension is the replacement for the domxml extension from PHP 4. The extension still contains + many old functions, but they should no longer be used. In particular, functions + that are not object-oriented should be avoided. + + + The extension allows you to operate on an XML document with the DOM API. + +
+ + &reference.dom.constants; + +
+ Classes + + The API of the module follows the DOM Level 2 standard as closely + as possible. Consequently, the API is fully object-oriented. + It is a good idea to have the DOM standard available when + using this module. + + + This module defines a number of classes, which are listed - + including their + method - in the following tables. Classes with an equivalent in the + DOM standard are named DOMxxx. + + + + + List of classes + + + + Class name + Parent classes + + + + + DOMAttr + DOMNode + + + DOMCDataSection + DOMText : DOMNode + + + DOMCharacterData + DOMNode + + + DOMComment + DOMCharacterData : DomNode + + + DOMDocument + DOMNode + + + DOMDocumentFragment + DOMNode + + + DOMDocumentType + DOMNode + + + DOMElement + DOMNode + + + DOMEntity + DOMNode + + + DOMEntityReference + DOMNode + + + DOMNode + + + + DOMNotation + DOMNode + + + DOMProcessingInstruction + DOMNode + + + DOMText + DOMCDataSection : DomNode + + + DOMException + + + + DOMImplementation + + + + DOMNamedNodeMap + + + + DOMNodeList + + + + DOMXPath + + + + +
+
+
+ +
+ +&reference.dom.functions; + +
+ +