« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 14 for asXML (0.002 sec.)
SimpleXMLElement::asXML — SimpleXML 要素に基づき整形式の XML 文字列を返す | PHP... 14266
SimpleXMLElement::asXML (PHP 5, PHP 7, PHP 8) SimpleXMLElement::asXML — SimpleXML 要素に基づき整形式の XML 文字列を返す 説明 public function SimpleXMLElement::asXML ( ? string $filename = null ): string | bool asXML メソッドは、親オブジェク ... <a> <b> <c>text</c> <c>stuff</c> </b> <d> <c>code</c> </d> </a> XML; $xml = new SimpleXMLElement ( $string ); echo $xml -> asXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0"?> <a> <b> <c>text</c> <c>stuff</c> </b> <d> <c>code</c> </d> </a ... > asXML は Xpath の結果にも適用できます: 例2 SimpleXMLElement::xpath() の結果に asXML() を使用する <?php $string = <<<XML <a> <b> ... ment ( $string ); /* <a><b><c>を探す */ $result = $xml -> xpath ( '/a/b/c' ); foreach ( $result as $node ) { echo $node -> asXML (); } ?> 上の例の出力は以下となります。 <c>text</c><c>stuff</c> 参考 SimpleXMLElement::__toString() - 文字列で要素の内容を ...
https://man.mtool.work/php/8.3/simplexmlelement.asxml.html
SimpleXMLElement::saveXML — SimpleXMLElement::asXML() | PHP 8.3 10345
SimpleXMLElement::saveXML (PHP 5 >= 5.2.0, PHP 7, PHP 8) SimpleXMLElement::saveXML — SimpleXMLElement::asXML() のエイリアス 説明 このメソッドは次のメソッドのエイリアスです。 SimpleXMLElement::asXML() 他のマニュアルの関連ページ Linux JM pral ...
https://man.mtool.work/php/8.3/simplexmlelement.savexml.html
SimpleXMLElement クラス | PHP 8.3 10152
SimpleXMLElement クラス (PHP 5, PHP 7, PHP 8) はじめに XML ドキュメントの要素をあらわします。 クラス概要 class SimpleXMLElement implements Stringable , Countable , RecursiveIterator { /* メソッド */ public function __construct ( string $dat ... dChild ( string $qualifiedName , ? string $value = null , ? string $namespace = null ): ? SimpleXMLElement public function asXML ( ? string $filename = null ): string | bool public function attributes ( ? string $namespaceOrPrefix = null , bool $isPre ... ath ( string $expression ): array | null | false } 変更履歴 バージョン 説明 8.4.0 値を取得するメソッド ( SimpleXMLElement::asXML() や SimpleXMLElement::getName() など) と、 SimpleXMLElement の string へのキャストは、 イテレータを暗黙的に巻き戻さなくな ... :addAttribute — SimpleXML 要素に属性を追加する SimpleXMLElement::addChild — XML ノードに子要素を追加する SimpleXMLElement::asXML — SimpleXML 要素に基づき整形式の XML 文字列を返す SimpleXMLElement::attributes — 要素の属性を定義する SimpleXMLElement::ch ...
https://man.mtool.work/php/8.3/class.simplexmlelement.html
SimpleXML | PHP 8.3 8822
SimpleXML はじめに SimpleXML拡張モジュールは、 XMLをオブジェクトにとても簡単かつ容易に変換するための機能を 提供します。変換後のオブジェクトでは、 通常のプロパティセレクタや配列反復子を用いて処理を行うことが 可能です。 インストール/設定 要件 ... :addAttribute — SimpleXML 要素に属性を追加する SimpleXMLElement::addChild — XML ノードに子要素を追加する SimpleXMLElement::asXML — SimpleXML 要素に基づき整形式の XML 文字列を返す SimpleXMLElement::attributes — 要素の属性を定義する SimpleXMLElement::ch ... ix/ns コンテキストを作成する SimpleXMLElement::rewind — 最初の要素に巻き戻す SimpleXMLElement::saveXML — SimpleXMLElement::asXML のエイリアス SimpleXMLElement::__toString — 文字列で要素の内容を返す SimpleXMLElement::valid — 現在の要素が有効かどうかを調 ...
https://man.mtool.work/php/8.3/book.simplexml.html
SimpleXMLElement::__toString — 文字列で要素の内容を返す | PHP 8.3 8244
SimpleXMLElement::__toString (PHP 5 >= 5.3.0, PHP 7, PHP 8) SimpleXMLElement::__toString — 文字列で要素の内容を返す 説明 public function SimpleXMLElement::__toString (): string この要素に直接入っているテキストの内容を返します。 この要素の子 ... = new SimpleXMLElement ( '<a>1 <b>2 </b>3</a>' ); echo $xml ; ?> 上の例の出力は以下となります。 1 3 参考 SimpleXMLElement::asXML() - SimpleXML 要素に基づき整形式の XML 文字列を返す ...
https://man.mtool.work/php/8.3/simplexmlelement.tostring.html
SimpleXMLElement::rewind — 最初の要素に巻き戻す | PHP 8.3 8052
SimpleXMLElement::rewind (PHP 8) SimpleXMLElement::rewind — 最初の要素に巻き戻す 説明 public function SimpleXMLElement::rewind (): void 警告 PHP 8.0 より前のバージョンでは、 SimpleXMLElement::rewind() は サブクラスの SimpleXMLIterator でのみ ... ソッドは、 SimpleXMLElement を最初の要素に巻き戻します。 注意 : PHP 8.4.0 以降では、値を取得するメソッド ( SimpleXMLElement::asXML() や SimpleXMLElement::getName() など) を呼び出したり、 SimpleXMLElement を string にキャストしたりしても、 イテレータが暗 ...
https://man.mtool.work/php/8.3/simplexmlelement.rewind.html
SimpleXMLIterator クラス | PHP 8.3 7964
SimpleXMLIterator クラス (PHP 5, PHP 7, PHP 8) はじめに SimpleXMLIterator は、 SimpleXMLElement オブジェクトのすべてのノードに対する再帰的な反復処理を提供します。 クラス概要 class SimpleXMLIterator extends SimpleXMLElement { /* 継承したメソ ... ualifiedName , ? string $value = null , ? string $namespace = null ): ? SimpleXMLElement public function SimpleXMLElement::asXML ( ? string $filename = null ): string | bool public function SimpleXMLElement::attributes ( ? string $namespaceOrPrefix = ...
https://man.mtool.work/php/8.3/class.simplexmliterator.html
Dom\import_simplexml — SimpleXMLElement | PHP 8.3 7964
Dom\import_simplexml (PHP 8 >= 8.4.0) Dom\import_simplexml — SimpleXMLElement オブジェクトから、 Dom\Attr や Dom\Element を取得する 説明 function Dom\import_simplexml ( object $node ): Dom\Attr | Dom\Element この関数は、与えられた属性または ... blah</title></book></books>' ); $elt = Dom\import_simplexml ( $sxe ); $elt -> setAttribute ( "foo" , "bar" ); echo $sxe -> asXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0"?> <books foo="bar"><book><title>blah</title></book></books> 参考 ...
https://man.mtool.work/php/8.3/function.dom-ns-import-simplexml.html
dom_import_simplexml — SimpleXMLElement | PHP 8.3 7859
dom_import_simplexml (PHP 5, PHP 7, PHP 8) dom_import_simplexml — SimpleXMLElement オブジェクトから DOMAttr または DOMElement オブジェクトを取得する 説明 function dom_import_simplexml ( object $node ): DOMAttr | DOMElement この関数は、指定さ ... blah</title></book></books>' ); $elt = dom_import_simplexml ( $sxe ); $elt -> setAttribute ( "foo" , "bar" ); echo $sxe -> asXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0"?> <books foo="bar"><book><title>blah</title></book></books> 参考 ...
https://man.mtool.work/php/8.3/function.dom-import-simplexml.html
基本的な SimpleXML の使用法 | PHP 8.3 7859
基本的な SimpleXML の使用法 このリファレンスの多くの例では XML 文字列が必要です。それぞれの例で この文字列をくり返す代わりに、あるファイルにこの文字列を保存して、 例ごとに読みこむことにします。この読みこまれるファイルは、以下の例 に関するセ ... mpleXMLElement ( $xmlstr ); $movies -> movie [ 0 ]-> characters -> character [ 0 ]-> name = 'Miss Coder' ; echo $movies -> asXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0" standalone="yes"?> <movies> <movie> <title>PHP: Behind the Parse ... ting = $movies -> movie [ 0 ]-> addChild ( 'rating' , 'PG' ); $rating -> addAttribute ( 'type' , 'mpaa' ); echo $movies -> asXML (); ?> 上の例の出力は以下となります。 <?xml version="1.0" standalone="yes"?> <movies> <movie> <title>PHP: Behind the Parse ...
https://man.mtool.work/php/8.3/simplexml.examples-basic.html
PREV 1 2 NEXT