Results of 1 - 1 of about 1 for XFoo (0.000 sec.)
- DOMDocument::createElementNS — 関連付けられた名前空間に新しい要素を作成する | P... 9414
- DOMDocument::createElementNS (PHP 5, PHP 7, PHP 8) DOMDocument::createElementNS — 関連付けられた名前空間に新しい要素を作成する 説明 public function DOMDocument::createElementNS ( ? string $namespace , string $qualifiedName , string $value =
... して挿入する <?php $dom = new DOMDocument ( '1.0' , 'utf-8' ); $element = $dom -> createElementNS ( 'http://www.example.com/XFoo' , 'xfoo:test' , 'This is the root element!' ); // 新しい要素をルート (ドキュメントの子要素) として挿入する $dom -> append ... hild ( $element ); echo $dom -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0" encoding="iso-8859-1"?> <xfoo:test xmlns:xfoo="http://www.example.com/XFoo">This is the root element!</xfoo:test> 例2 名前空間プレフィックスの例 <?php $ ...
-
https://man.mtool.work/php/8.3/domdocument.createelementns.html
PREV
1
NEXT