note 106200 added to domdocument.createattribute
| From: | michel at mastersmx dot com | Date: | Tue, 18 Oct 2011 13:09:26 +0000 |
| Subject: | note 106200 added to domdocument.createattribute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183955@lists.php.net to get a copy of this message | ||
$doc = new DOMDocument;
$node = $doc->createElement("node");
$newnode = $doc->appendChild($node);
$node_item = $doc->createElement("item");
$node_item_attribute = $doc->createAttribute("att");
$node_item->appendChild($node_item_attribute);
$node_item_text = $doc->createTextNode("att text");
$node_item_attribute->appendChild($node_item_text);
$node->appendChild($node_item);
Result:
<?xml version="1.0"?>
<root>
<item att="att text"/>
</root>
----
Server IP: 69.147.83.197
Probable Submitter: 201.21.49.203
----
Manual Page -- http://www.php.net/manual/en/domdocument.createattribute.php
Edit -- https://master.php.net/note/edit/106200
Del: integrated -- https://master.php.net/note/delete/106200/integrated
Del: useless -- https://master.php.net/note/delete/106200/useless
Del: bad code -- https://master.php.net/note/delete/106200/bad+code
Del: spam -- https://master.php.net/note/delete/106200/spam
Del: non-english -- https://master.php.net/note/delete/106200/non-english
Del: in docs -- https://master.php.net/note/delete/106200/in+docs
Del: other reasons-- https://master.php.net/note/delete/106200
Reject -- https://master.php.net/note/reject/106200
Search -- https://master.php.net/manage/user-notes.php