PHP » GoLang |
login |
register |
about
|
GoLang DOMDocument::createElement
request it (453)
GoLang replacement for PHP's DOMDocument::createElement
[edit | history]
PHP DOMDocument::createElementPHP original manual for DOMDocument::createElement [ show | php.net ]DOMDocument::createElement(PHP 5, PHP 7) DOMDocument::createElement — Create new element node DescriptionThis function creates a new instance of class DOMElement. This node will not show up in the document unless it is inserted with (e.g.) DOMNode::appendChild(). Parameters
Return Values
Returns a new instance of class DOMElement or Errors/Exceptions
Examples
Example #1 Creating a new element and inserting it as root
<?php The above example will output: <?xml version="1.0" encoding="utf-8"?> <test>This is the root element!</test>
Example #2 Passing text containing an unescaped & as
<?php The above example will output something similar to: Warning: DOMDocument::createElement(): unterminated entity reference you in /in/BjTCg on line 4 <?xml version="1.0" encoding="utf-8"?> <foo/> Notes
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|