« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 76 for appendChild (0.001 sec.)
DOMNode::appendChild — 子要素群の最後に新しい子要素を追加する | PHP 8.3 12163
DOMNode::appendChild (PHP 5, PHP 7, PHP 8) DOMNode::appendChild — 子要素群の最後に新しい子要素を追加する 説明 public function DOMNode::appendChild ( DOMNode $node ): DOMNode | false この関数は、既存の子要素のリストに新しい子要素を追加するか ... を追加します。 例1 子要素の追加 <?php $doc = new DOMDocument ; $node = $doc -> createElement ( "para" ); $newnode = $doc -> appendChild ( $node ); echo $doc -> saveXML (); ?> 例2 ネストされた子ノード <?php $doc = new DOMDocument ; $headNode = $doc -> createE ... lement ( "head" ); $doc -> appendChild ( $headNode ); $titleNode = $doc -> createElement ( "title" ); $headNode -> appendChild ( $titleNode ); echo $doc -> saveX ...
https://man.mtool.work/php/8.3/domnode.appendchild.html
CommonMark\Node::appendChild — AST Manipulation | PHP 8.3 10805
CommonMark\Node::appendChild (cmark >= 1.0.0) CommonMark\Node::appendChild — AST Manipulation 説明 public function CommonMark\Node::appendChild ( CommonMark\Node $child ): CommonMark\Node 警告 この関数は、 現在のところ詳細な情報はありません ...
https://man.mtool.work/php/8.3/commonmark-node.appendchild.html
DOMDocument::saveHTML — 内部のドキュメントを HTML 形式の文字列として出力する | ... 10805
DOMDocument::saveHTML (PHP 5, PHP 7, PHP 8) DOMDocument::saveHTML — 内部のドキュメントを HTML 形式の文字列として出力する 説明 public function DOMDocument::saveHTML ( ? DOMNode $node = null ): string | false DOM 表現から HTML ドキュメントを作 ... ツリーを文字列に保存する <?php $doc = new DOMDocument ( '1.0' ); $root = $doc -> createElement ( 'html' ); $root = $doc -> appendChild ( $root ); $head = $doc -> createElement ( 'head' ); $head = $root -> appendChild ( $head ); $title = $doc -> createElemen ... t ( 'title' ); $title = $head -> appendChild ( $title ); $text = $doc -> createTextNode ( 'This is the title' ); $text = $title -> appendChild ( $text ); echo $doc -> ...
https://man.mtool.work/php/8.3/domdocument.savehtml.html
DOMDocument::saveHTMLFile — 内部のドキュメントを HTML 形式でファイルに出力する ... 10666
DOMDocument::saveHTMLFile (PHP 5, PHP 7, PHP 8) DOMDocument::saveHTMLFile — 内部のドキュメントを HTML 形式でファイルに出力する 説明 public function DOMDocument::saveHTMLFile ( string $filename ): int | false DOM 表現から HTML ドキュメントを ... / 出力はきれいに整形したいですね。 $doc -> formatOutput = true ; $root = $doc -> createElement ( 'html' ); $root = $doc -> appendChild ( $root ); $head = $doc -> createElement ( 'head' ); $head = $root -> appendChild ( $head ); $title = $doc -> createElemen ... t ( 'title' ); $title = $head -> appendChild ( $title ); $text = $doc -> createTextNode ( 'This is the title' ); $text = $title -> appendChild ( $text ); echo 'Wrote: ...
https://man.mtool.work/php/8.3/domdocument.savehtmlfile.html
DOMDocument::createElementNS — 関連付けられた名前空間に新しい要素を作成する | P... 9711
DOMDocument::createElementNS (PHP 5, PHP 7, PHP 8) DOMDocument::createElementNS — 関連付けられた名前空間に新しい要素を作成する 説明 public function DOMDocument::createElementNS ( ? string $namespace , string $qualifiedName , string $value = ... "" ): DOMElement | false この関数は、関連付けられた名前空間に新しい要素を作成します。 このノードは、( DOMNode::appendChild() などで) 挿入されない限り、ドキュメント内にあらわれません。 パラメータ namespace 名前空間の URI。 qualifiedName 要素名を、 ... m/XFoo' , 'xfoo:test' , 'This is the root element!' ); // 新しい要素をルート (ドキュメントの子要素) として挿入する $dom -> appendChild ( $element ); echo $dom -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0" encoding="iso-8859-1"?> <xfoo ... 8' ); $doc -> formatOutput = true ; $root = $doc -> createElementNS ( 'http://www.w3.org/2005/Atom' , 'element' ); $doc -> appendChild ( $root ); $root -> setAttributeNS ( 'http://www.w3.org/2000/xmlns/' , 'xmlns:g' , 'http://base.google.com/ns/1.0' ); $ite ...
https://man.mtool.work/php/8.3/domdocument.createelementns.html
DOMProcessingInstruction::__construct — 新しい DOMProcessingInstruction | PHP 8... 9309
DOMProcessingInstruction::__construct (PHP 5, PHP 7, PHP 8) DOMProcessingInstruction::__construct — 新しい DOMProcessingInstruction オブジェクトを作成する 説明 public function DOMProcessingInstruction::__construct ( string $name , string $v ... 令の値。 例 例1 新しい DOMProcessingInstruction を作成する <?php $dom = new DOMDocument ( '1.0' , 'UTF-8' ); $html = $dom -> appendChild (new DOMElement ( 'html' )); $body = $html -> appendChild (new DOMElement ( 'body' )); $pinode = new DOMProcessingInstruct ... ion ( 'php' , 'echo "Hello World"; ' ); $body -> appendChild ( $pinode ); echo $dom -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0" encoding="UTF-8"?> <html><body ...
https://man.mtool.work/php/8.3/domprocessinginstruction.construct.html
DOMDocument::save — 内部の XML ツリーをファイルに出力する | PHP 8.3 9032
DOMDocument::save (PHP 5, PHP 7, PHP 8) DOMDocument::save — 内部の XML ツリーをファイルに出力する 説明 public function DOMDocument::save ( string $filename , int $options = 0 ): int | false DOM 表現から XML ドキュメントを作成します。この関数 ... / 出力はきれいに整形したいですね。 $doc -> formatOutput = true ; $root = $doc -> createElement ( 'book' ); $root = $doc -> appendChild ( $root ); $title = $doc -> createElement ( 'title' ); $title = $root -> appendChild ( $title ); $text = $doc -> createTex ... tNode ( 'This is the title' ); $text = $title -> appendChild ( $text ); echo 'Wrote: ' . $doc -> save ( "/tmp/test.xml" ) . ' bytes' ; // Wrote: 72 bytes ?> 参考 DOMDocument::saveXML( ...
https://man.mtool.work/php/8.3/domdocument.save.html
DOMDocument::createElement — 新しい要素ノードを作成する | PHP 8.3 8907
DOMDocument::createElement (PHP 5, PHP 7, PHP 8) DOMDocument::createElement — 新しい要素ノードを作成する 説明 public function DOMDocument::createElement ( string $localName , string $value = "" ): DOMElement | false この関数は、 DOMElement ... クラスの新しいインスタンスを作成します。 このノードは、( DOMNode::appendChild() などで) 挿入されない限り、ドキュメント内にあらわれません。 パラメータ localName 要素のタグ名。 value 要素の値。デフォルト ... reateElement ( 'test' , 'This is the root element!' ); // 新しい要素をルート (ドキュメントの子要素) として挿入する $dom -> appendChild ( $element ); echo $dom -> saveXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0" encoding="utf-8"?> <test>This ... に渡す例 <?php $dom = new DOMDocument ( '1.0' , 'utf-8' ); $element = $dom -> createElement ( 'foo' , 'me & you' ); $dom -> appendChild ( $element ); echo $dom -> saveXML (); ?> 上の例の出力は、 たとえば以下のようになります。 Warning: DOMDocument::createElem ...
https://man.mtool.work/php/8.3/domdocument.createelement.html
DOMEntityReference::__construct — 新しい DOMEntityReference オブジェクトを作成... 8491
DOMEntityReference::__construct (PHP 5, PHP 7, PHP 8) DOMEntityReference::__construct — 新しい DOMEntityReference オブジェクトを作成する 説明 public function DOMEntityReference::__construct ( string $name ) 新しい DOMEntityReference オブジェ ... 名前。 例 例1 新しい DOMEntityReference を作成する <?php $dom = new DOMDocument ( '1.0' , 'iso-8859-1' ); $element = $dom -> appendChild (new DOMElement ( 'root' )); $entity = $element -> appendChild (new DOMEntityReference ( 'nbsp' )); echo $dom -> saveXML ( ...
https://man.mtool.work/php/8.3/domentityreference.construct.html
DOMDocument::saveXML — 内部の XML ツリーを文字列として出力する | PHP 8.3 8367
DOMDocument::saveXML (PHP 5, PHP 7, PHP 8) DOMDocument::saveXML — 内部の XML ツリーを文字列として出力する 説明 public function DOMDocument::saveXML ( ? DOMNode $node = null , int $options = 0 ): string | false DOM 表現から XML ドキュメントを ... / 出力はきれいに整形したいですね。 $doc -> formatOutput = true ; $root = $doc -> createElement ( 'book' ); $root = $doc -> appendChild ( $root ); $title = $doc -> createElement ( 'title' ); $title = $root -> appendChild ( $title ); $text = $doc -> createTex ... tNode ( 'これはタイトルです' ); $text = $title -> appendChild ( $text ); echo "ドキュメント全体を保存します\n" ; echo $doc -> saveXML () . "\n" ; echo "タイトルの部分のみを保存します\n ...
https://man.mtool.work/php/8.3/domdocument.savexml.html
PREV 1 2 3 4 5 6 7 8 NEXT