Results of 1 - 10 of about 49 for loadXML (0.001 sec.)
- DOMDocument::loadXML — 文字列から XML を読み込む | PHP 8.3 15575
- DOMDocument::loadXML (PHP 5, PHP 7, PHP 8) DOMDocument::loadXML — 文字列から XML を読み込む 説明 public function DOMDocument::loadXML ( string $source , int $options = 0 ): bool XML ドキュメントを文字列から読み込みます。 パラメータ source X
... のバージョンでは、 E_DEPRECATED が発生していました。 例 例1 ドキュメントを作成する <?php $doc = new DOMDocument (); $doc -> loadXML ( '<root><node/></root>' ); echo $doc -> saveXML (); ?> 参考 DOMDocument::load() - ファイルから XML を読み込む DOMDocument ...
-
https://man.mtool.work/php/8.3/domdocument.loadxml.html
- DOMDocument::adoptNode — ノードを別のドキュメントに移す | PHP 8.3 10097
- DOMDocument::adoptNode (PHP >= 8.3) DOMDocument::adoptNode — ノードを別のドキュメントに移す 説明 public function DOMDocument::adoptNode ( DOMNode $node ): DOMNode | false ノードを別のドキュメントから、現在のドキュメントに移します。 パラメー
... ument::adoptNode() の例 最初のドキュメントの hello 要素を二番目のものに移します。 <?php $doc1 = new DOMDocument ; $doc1 -> loadXML ( "<container><hello><world/></hello></container>" ); $hello = $doc1 -> documentElement -> firstChild ; $doc2 = new DOMDoc ... ument ; $doc2 -> loadXML ( "<root/>" ); $doc2 -> documentElement -> appendChild ( $doc2 -> adoptNode ( $hello )); echo $doc1 -> saveXML () . PHP_EO ...
-
https://man.mtool.work/php/8.3/domdocument.adoptnode.html
- libxml のエラー処理関数によるエラー処理 | PHP 8.3 9855
- libxml のエラー処理関数によるエラー処理 libxml にはエラー処理用の関数が用意されており、これらを使うと、 XSLT の処理中のエラーを捕らえて対応できます。 例1 fruits.xml 妥当な XML ファイルです。 <fruits> <fruit>Apple</fruit> <fruit>Banana</frui
... 表示するものです。 <?php $xmldoc = new DOMDocument (); $xsldoc = new DOMDocument (); $xsl = new XSLTProcessor (); $xmldoc -> loadXML ( 'fruits.xml' ); $xsldoc -> loadXML ( 'fruits.xsl' ); libxml_use_internal_errors ( true ); $result = $xsl -> importStyleS ...
-
https://man.mtool.work/php/8.3/xsl.examples-errors.html
- DOMDocument::importNode — 現在のドキュメントにノードをインポートする | PHP 8.3 9100
- DOMDocument::importNode (PHP 5, PHP 7, PHP 8) DOMDocument::importNode — 現在のドキュメントにノードをインポートする 説明 public function DOMDocument::importNode ( DOMNode $node , bool $deep = false ): DOMNode | false この関数は、インポートす
... 例 例1 DOMDocument::importNode() の例 ノードをドキュメント間でコピーします。 <?php $orgdoc = new DOMDocument ; $orgdoc -> loadXML ( "<root><element><child>text in child</child></element></root>" ); // 新しいドキュメントにインポートしたいノード $node = ... ドキュメントを作成します $newdoc = new DOMDocument ; $newdoc -> formatOutput = true ; // マークアップを追加します $newdoc -> loadXML ( "<root><someelement>text in some element</someelement></root>" ); echo "The 'new document' before copying nodes into it: ...
-
https://man.mtool.work/php/8.3/domdocument.importnode.html
- XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数と... 8859
- XSLTProcessor::registerPHPFunctionNS (PHP >= 8.4.0) XSLTProcessor::registerPHPFunctionNS — PHP の関数を、名前空間付きの XSLT 関数として登録する 説明 public function XSLTProcessor::registerPHPFunctionNS ( string $namespaceURI , string $name
... r> </xsl:for-each> </table> </body></html> </xsl:template> </xsl:stylesheet> EOB; $xmldoc = new DOMDocument (); $xmldoc -> loadXML ( $xml ); $xsldoc = new DOMDocument (); $xsldoc -> loadXML ( $xsl ); $proc = new XSLTProcessor (); $proc -> registerPHPFun ...
-
https://man.mtool.work/php/8.3/xsltprocessor.registerphpfunctionns.html
- XSLTProcessor::registerPHPFunctions — PHP 関数を XSLT 関数として利用できるよう... 8859
- XSLTProcessor::registerPHPFunctions (PHP 5 >= 5.0.4, PHP 7, PHP 8) XSLTProcessor::registerPHPFunctions — PHP 関数を XSLT 関数として利用できるようにする 説明 public function XSLTProcessor::registerPHPFunctions ( array | string | null $functi
... r> </xsl:for-each> </table> </body></html> </xsl:template> </xsl:stylesheet> EOB; $xmldoc = new DOMDocument (); $xmldoc -> loadXML ( $xml ); $xsldoc = new DOMDocument (); $xsldoc -> loadXML ( $xsl ); $proc = new XSLTProcessor (); $proc -> registerPHPFun ...
-
https://man.mtool.work/php/8.3/xsltprocessor.registerphpfunctions.html
- DOMElement::getAttributeNames — 属性の名前を取得する | PHP 8.3 8361
- DOMElement::getAttributeNames (PHP 8 >= 8.3.0) DOMElement::getAttributeNames — 属性の名前を取得する 説明 public function DOMElement::getAttributeNames (): array 属性の名前を取得します。 パラメータ この関数にはパラメータはありません。 戻り値
... 属性の名前を返します。 例 例1 DOMElement::getAttributeNames() の例 <?php $dom = new DOMDocument (); $dom -> loadXML ( '<html xmlns:some="some:ns" some:test="a" test2="b"/>' ); var_dump ( $dom -> documentElement -> getAttributeNames ()); ? ...
-
https://man.mtool.work/php/8.3/domelement.getattributenames.html
- DOMDocument::registerNodeClass — 基底ノード型を作成する際に使用する拡張クラスを... 8119
- DOMDocument::registerNodeClass (PHP 5 >= 5.2.0, PHP 7, PHP 8) DOMDocument::registerNodeClass — 基底ノード型を作成する際に使用する拡張クラスを登録する 説明 public function DOMDocument::registerNodeClass ( string $baseClass , ? string $extend
... ment extends DOMElement { public function __toString () { return $this -> nodeValue ; } } $doc = new DOMDocument ; $doc -> loadXML ( "<root><element><child>text in child</child></element></root>" ); $doc -> registerNodeClass ( "DOMElement" , "myElement" ... class MyOtherDOMDocument extends DOMDocument { } // XML から myDOMDocument を作成します $doc = new MyDOMDocument ; $doc -> loadXML ( "<root><element><child>text in child</child></element></root>" ); $child = $doc -> getElementsByTagName ( "child" )-> it ...
-
https://man.mtool.work/php/8.3/domdocument.registernodeclass.html
- DOMNode::getRootNode — ルート(根)ノードを取得する | PHP 8.3 8119
- DOMNode::getRootNode (PHP 8 >= 8.3.0) DOMNode::getRootNode — ルート(根)ノードを取得する 説明 public function DOMNode::getRootNode ( ? array $options = null ): DOMNode ルート(根)ノードを取得します。 パラメータ options このパラメータにはまだ意
... がありません 戻り値 ルート(根)ノードを返します。 例 例1 DOMNode::getRootNode() の例 <?php $dom = new DOMDocument (); $dom -> loadXML ( '<?xml version="1.0"?><html><body/></html>' ); var_dump ( $dom -> documentElement -> firstElementChild -> getRootNode () ...
-
https://man.mtool.work/php/8.3/domnode.getrootnode.html
- DOMCharacterData::remove — CDATAノードを削除する | PHP 8.3 7863
- DOMCharacterData::remove (PHP 8) DOMCharacterData::remove — CDATAノードを削除する 説明 public function DOMCharacterData::remove (): void CDATA ノードを削除します。 パラメータ この関数にはパラメータはありません。 戻り値 値を返しません。 例 例
... 1 DOMCharacterData::remove() の例 文字データを削除します。 <?php $doc = new DOMDocument ; $doc -> loadXML ( "<container><![CDATA[hello]]><world/></container>" ); $cdata = $doc -> documentElement -> firstChild ; $cdata -> remove ...
-
https://man.mtool.work/php/8.3/domcharacterdata.remove.html