Results of 1 - 10 of about 66 for documentElement (0.004 sec.)
- 属性の値を切り替える 10673
- « DOMElement::setIdAttributeNS DOMEntity » PHP Manual DOMElement 属性の値を切り替える 検索 DOMElement::toggleAttribute (PHP 8 >= 8.3.0) DOMElement::toggleAttribute — 属性の値を切り替える 説明 public function DOMElement::toggleAttribute ( st
... <?php $dom = new DOMDocument (); $dom -> loadXML ( "<?xml version='1.0'?><container selected=\"\"/>" ); var_dump ( $dom -> documentElement -> toggleAttribute ( 'selected' )); echo $dom -> saveXML () . PHP_EOL ; var_dump ( $dom -> documentElement -> toggleAttrib ... 関連キーワード: 属性 DOMElement toggleAttribute dom bool selected true false xml container qualifiedName force null var dump documentElement echo saveXML setIdAttributeNS Search ...
-
https://man.mtool.work/php/8.3/domelement.toggleattribute.html
- 属性の値を切り替える 10673
- « DOMElement::setIdAttributeNS DOMEntity » PHP Manual DOMElement 属性の値を切り替える 検索 DOMElement::toggleAttribute (PHP 8 >= 8.3.0) DOMElement::toggleAttribute — 属性の値を切り替える 説明 public function DOMElement::toggleAttribute ( st
... <?php $dom = new DOMDocument (); $dom -> loadXML ( "<?xml version='1.0'?><container selected=\"\"/>" ); var_dump ( $dom -> documentElement -> toggleAttribute ( 'selected' )); echo $dom -> saveXML () . PHP_EOL ; var_dump ( $dom -> documentElement -> toggleAttrib ... .0"?> <container selected=""/> 関連キーワード: 属性 DOMElement toggleAttribute selected container qualifiedName force dump documentElement saveXML setIdAttributeNS DOMEntity 修飾 DOMDocument loadXML ...
-
https://man.mtool.work/php/8.3/domelement.toggleattribute.html
- ノードを別のドキュメントに移す 10288
- « DOMDocument DOMDocument::append » PHP Manual DOMDocument ノードを別のドキュメントに移す 検索 DOMDocument::adoptNode (PHP >= 8.3) DOMDocument::adoptNode — ノードを別のドキュメントに移す 説明 public function DOMDocument::adoptNode ( DOMNode
... 。 <?php $doc1 = new DOMDocument ; $doc1 -> loadXML ( "<container><hello><world/></hello></container>" ); $hello = $doc1 -> documentElement -> firstChild ; $doc2 = new DOMDocument ; $doc2 -> loadXML ( "<root/>" ); $doc2 -> documentElement -> appendChild ( $doc2 ... 関連キーワード: DOMDocument ノード doc ドキュメント hello adoptNode container root DOMNode node false 現在 new loadXML world documentElement echo saveXML xml Search ...
-
https://man.mtool.work/php/8.3/domdocument.adoptnode.html
- ノードを別のドキュメントに移す 10088
- « DOMDocument DOMDocument::append » PHP Manual DOMDocument ノードを別のドキュメントに移す 検索 DOMDocument::adoptNode (PHP >= 8.3) DOMDocument::adoptNode — ノードを別のドキュメントに移す 説明 public function DOMDocument::adoptNode ( DOMNode
... 。 <?php $doc1 = new DOMDocument ; $doc1 -> loadXML ( "<container><hello><world/></hello></container>" ); $hello = $doc1 -> documentElement -> firstChild ; $doc2 = new DOMDocument ; $doc2 -> loadXML ( "<root/>" ); $doc2 -> documentElement -> appendChild ( $doc2 ... ドをインポートする 関連キーワード: DOMDocument ノード ドキュメント hello adoptNode container root DOMNode node loadXML world documentElement saveXML append エラーコード DOMException 転送 サポート 最初 firstChild appendChild 参考 importNode インポート ...
-
https://man.mtool.work/php/8.3/domdocument.adoptnode.html
- 属性の名前空間または、修飾名を変更する 9118
- « Dom\Attr::isId Dom\CDATASection » PHP Manual Dom\Attr 属性の名前空間または、修飾名を変更する 検索 Dom\Attr::rename (PHP 8 >= 8.4.0) Dom\Attr::rename — 属性の名前空間または、修飾名を変更する 説明 public function Dom\Attr::rename ( ? string
... も urn:my-ns に変更します。 <?php $doc = Dom\XMLDocument :: createFromString ( '<root my-attr="value"/>' ); $root = $doc -> documentElement ; $attribute = $root -> attributes [ 'my-attr' ]; $attribute -> rename ( 'urn:my-ns' , 'my-new-attr' ); echo $doc -> saveX ... 前空間 URI は元のままです。 <?php $doc = Dom\XMLDocument :: createFromString ( '<root my-attr="value"/>' ); $root = $doc -> documentElement ; $attribute = $root -> attributes [ 'my-attr' ]; $attribute -> rename ( $attribute -> namespaceURI , 'my-new-attr' ); ech ... ワード: 空間 修飾 attr rename root 属性 Attr attribute namespaceURI qualifiedName DOMException XMLDocument createFromString documentElement attributes saveXml encoding isId CDATASection 両方 xmlns 一度 規則 参考 Element ...
-
https://man.mtool.work/php/8.3/dom-attr.rename.html
- 属性の名前を取得する 9118
- « DOMElement::getAttribute DOMElement::getAttributeNode » PHP Manual DOMElement 属性の名前を取得する 検索 DOMElement::getAttributeNames (PHP 8 >= 8.3.0) DOMElement::getAttributeNames — 属性の名前を取得する 説明 public function DOMElement::g
... $dom = new DOMDocument (); $dom -> loadXML ( '<html xmlns:some="some:ns" some:test="a" test2="b"/>' ); var_dump ( $dom -> documentElement -> getAttributeNames ()); ?> 上の例の出力は以下となります。 array(3) { [0]=> string(10) "xmlns:some" [1]=> string(9) "some ... ) "test2" } 関連キーワード: DOMElement 属性 getAttributeNames xmlns getAttribute getAttributeNode DOMDocument loadXML dump documentElement ...
-
https://man.mtool.work/php/8.3/domelement.getattributenames.html
- ルート(根)ノードを取得する 9118
- « DOMNode::getNodePath DOMNode::hasAttributes » PHP Manual DOMNode ルート(根)ノードを取得する 検索 DOMNode::getRootNode (PHP 8 >= 8.3.0) DOMNode::getRootNode — ルート(根)ノードを取得する 説明 public function DOMNode::getRootNode ( ? array $
... の例 <?php $dom = new DOMDocument (); $dom -> loadXML ( '<?xml version="1.0"?><html><body/></html>' ); var_dump ( $dom -> documentElement -> firstElementChild -> getRootNode () === $dom ); ?> 上の例の出力は以下となります。 bool(true) 関連キーワード: DOMNode ル ... ート ノード getRootNode options getNodePath hasAttributes 意味 DOMDocument loadXML body dump documentElement firstElementChild ...
-
https://man.mtool.work/php/8.3/domnode.getrootnode.html
- 要素を削除する 8733
- « DOMElement::prepend DOMElement::removeAttribute » PHP Manual DOMElement 要素を削除する 検索 DOMElement::remove (PHP 8) DOMElement::remove — 要素を削除する 説明 public function DOMElement::remove (): void 要素を削除します。 パラメータ この
... 削除します。 <?php $doc = new DOMDocument ; $doc -> loadXML ( "<container><hello/><world/></container>" ); $hello = $doc -> documentElement -> firstChild ; $hello -> remove (); echo $doc -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0"?> <con ... oc container hello ノード パラメータ world prepend Search removeAttribute function void 戻り値 php new DOMDocument loadXML documentElement ...
-
https://man.mtool.work/php/8.3/domelement.remove.html
- CDATAノードを削除する 8733
- « DOMCharacterData::insertData DOMCharacterData::replaceData » PHP Manual DOMCharacterData CDATAノードを削除する 検索 DOMCharacterData::remove (PHP 8) DOMCharacterData::remove — CDATAノードを削除する 説明 public function DOMCharacterData::r
... す。 <?php $doc = new DOMDocument ; $doc -> loadXML ( "<container><![CDATA[hello]]><world/></container>" ); $cdata = $doc -> documentElement -> firstChild ; $cdata -> remove (); echo $doc -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0"?> <con ... 除する 関連キーワード: DOMCharacterData ノード remove container world cdata insertData replaceData DOMDocument loadXML hello documentElement firstChild saveXML 参考 DOMChildNode after before replaceWith DOMNode removeChild ...
-
https://man.mtool.work/php/8.3/domcharacterdata.remove.html
- 要素を削除する 8733
- « DOMElement::prepend DOMElement::removeAttribute » PHP Manual DOMElement 要素を削除する 検索 DOMElement::remove (PHP 8) DOMElement::remove — 要素を削除する 説明 public function DOMElement::remove (): void 要素を削除します。 パラメータ この
... 削除します。 <?php $doc = new DOMDocument ; $doc -> loadXML ( "<container><hello/><world/></container>" ); $hello = $doc -> documentElement -> firstChild ; $hello -> remove (); echo $doc -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0"?> <con ... 子要素を削除する 関連キーワード: DOMElement remove container hello ノード world prepend removeAttribute DOMDocument loadXML documentElement firstChild saveXML 参考 after before replaceWith 置換 DOMNode removeChild ...
-
https://man.mtool.work/php/8.3/domelement.remove.html