From 6358a741684b001be81acc74695388ace5e706fe Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 2 Apr 2005 22:46:41 +0000 Subject: [PATCH] integrated user notes, examples, and wrapped text git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183432 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../dom-domdocument-createentityreference.xml | 9 ++-- ...m-domimplementation-createdocumenttype.xml | 47 ++++++++++++++++++- .../dom/functions/dom-domnode-removechild.xml | 5 +- .../functions/dom-domnode-replacechild.xml | 9 ++-- 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/reference/dom/functions/dom-domdocument-createentityreference.xml b/reference/dom/functions/dom-domdocument-createentityreference.xml index 1cceeebd9b..1fca5205e9 100644 --- a/reference/dom/functions/dom-domdocument-createentityreference.xml +++ b/reference/dom/functions/dom-domdocument-createentityreference.xml @@ -1,5 +1,5 @@ - + DOMDocument->createEntityReference() @@ -27,7 +27,9 @@ name - The content of the entity reference. + The content of the entity reference, e.g. the entity reference minus + the leading & and the trailing + ; characters. @@ -37,7 +39,8 @@ &reftitle.returnvalues; - The new DOMEntityReference or &false; if an error occured. + The new DOMEntityReference or &false; if an error + occured. diff --git a/reference/dom/functions/dom-domimplementation-createdocumenttype.xml b/reference/dom/functions/dom-domimplementation-createdocumenttype.xml index a5a5bd8841..8eca39f86d 100644 --- a/reference/dom/functions/dom-domimplementation-createdocumenttype.xml +++ b/reference/dom/functions/dom-domimplementation-createdocumenttype.xml @@ -1,5 +1,5 @@ - + DOMImplementation->createDocumentType() @@ -62,6 +62,51 @@ ownerDocument set to &null;. + + &reftitle.examples; + + + Creating a document with an attached DTD + + createDocumentType('graph', '', 'graph.dtd'); + +// Creates a DOMDocument instance +$dom = $imp->createDocument("", "", $dtd); + +// Set other properties +$dom->encoding = 'UTF-8'; +$dom->standalone = false; + +// Create an empty element +$element = $dom->createElement('graph'); + +// Append the element +$dom->appendChild($element); + +// Retrieve and print the document +echo $dom->saveXML(); + +?> +]]> + + &example.outputs; + + + + +]]> + + + + &reftitle.exceptions; diff --git a/reference/dom/functions/dom-domnode-removechild.xml b/reference/dom/functions/dom-domnode-removechild.xml index 2bfac10441..0e845544f8 100644 --- a/reference/dom/functions/dom-domnode-removechild.xml +++ b/reference/dom/functions/dom-domnode-removechild.xml @@ -1,5 +1,5 @@ - + DOMNode->removeChild() @@ -90,7 +90,8 @@ echo $doc->saveXML(); - + My lists diff --git a/reference/dom/functions/dom-domnode-replacechild.xml b/reference/dom/functions/dom-domnode-replacechild.xml index da7e4bf650..9acc196240 100644 --- a/reference/dom/functions/dom-domnode-replacechild.xml +++ b/reference/dom/functions/dom-domnode-replacechild.xml @@ -1,5 +1,5 @@ - + DOMNode->replaceChild() @@ -21,8 +21,7 @@ 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. + old node is returned. @@ -33,7 +32,9 @@ newnode - The new node. + The new node. It must be a member of the target document, i.e. + created by one of the DOMDocument->createXXX() methods or imported in + the document by .