« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 18 for para (0.002 sec.)
DOMDocument オブジェクト内の XIncludes を置換する 10741
« DOMDocument::validate DOMDocumentFragment » PHP Manual DOMDocument DOMDocument オブジェクト内の XIncludes を置換する 検索 DOMDocument::xinclude (PHP 5, PHP 7, PHP 8) DOMDocument::xinclude — DOMDocument オブジェクト内の XIncludes を置換する ... <<EOD <?xml version="1.0" ?> <chapter xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Books of the other guy..</title> <para> <xi:include href="examples/book.xml"> <xi:fallback> <error>xinclude: book.xml not found</error> </xi:fallback> </xi:inclu ... de> </para> </chapter> EOD; $dom = new DOMDocument ; // 見た目をきれいにします $dom -> preserveWhiteSpace = false ; $dom -> formatOut ... ります。 <?xml version="1.0"?> <chapter xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Books of the other guy..</title> <para> <row xml:base="/home/didou/book.xml"> <entry>The Grapes of Wrath</entry> <entry>John Steinbeck</entry> <entry>en</entry> ...
https://man.mtool.work/php/8.3/domdocument.xinclude.html
DOMDocument オブジェクト内の XIncludes を置換する 10741
« DOMDocument::validate DOMDocumentFragment » PHP Manual DOMDocument DOMDocument オブジェクト内の XIncludes を置換する 検索 DOMDocument::xinclude (PHP 5, PHP 7, PHP 8) DOMDocument::xinclude — DOMDocument オブジェクト内の XIncludes を置換する ... <<EOD <?xml version="1.0" ?> <chapter xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Books of the other guy..</title> <para> <xi:include href="examples/book.xml"> <xi:fallback> <error>xinclude: book.xml not found</error> </xi:fallback> </xi:inclu ... de> </para> </chapter> EOD; $dom = new DOMDocument ; // 見た目をきれいにします $dom -> preserveWhiteSpace = false ; $dom -> formatOut ... ります。 <?xml version="1.0"?> <chapter xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Books of the other guy..</title> <para> <row xml:base="/home/didou/book.xml"> <entry>The Grapes of Wrath</entry> <entry>John Steinbeck</entry> <entry>en</entry> ...
https://man.mtool.work/php/8.3/domdocument.xinclude.html
配列構造体に XML データを処理する 10741
« xml_parse xml_parser_create » PHP Manual XML パーサー 関数 配列構造体に XML データを処理する 検索 xml_parse_into_struct (PHP 4, PHP 5, PHP 7, PHP 8) xml_parse_into_struct — 配列構造体に XML データを処理する 説明 function xml_parse_into_st ... 有効な xml resource が期待されていました。 例 以下の例は、この関数により生成された配列の内部構造を示すものです。 note タグを para タグの中に埋 め込んで使用した後、これをパースし、生成された構造体を出力します。 例1 xml_parse_into_struct() の例 <?php $si ... mple = "<para><note>simple note</note></para>" ; $p = xml_parser_create (); xml_parse_into_struct ( $p , $simple , $vals , $index ); ech ... ); echo "\nVals array\n" ; print_r ( $vals ); ?> このコードを実行した場合、出力は次のようになります。 Index array Array ( [PARA] => Array ( [0] => 0 [1] => 2 ) [NOTE] => Array ( [0] => 1 ) ) Vals array Array ( [0] => Array ( [tag] => PARA [type] => o ...
https://man.mtool.work/php/8.3/function.xml-parse-into-struct.html
次の XPath クエリ用の prefix/ns コンテキストを作成する 10037
« SimpleXMLElement::next SimpleXMLElement::rewind » PHP Manual SimpleXMLElement 次の XPath クエリ用の prefix/ns コンテキストを作成する 検索 SimpleXMLElement::registerXPathNamespace (PHP 5 >= 5.1.0, PHP 7, PHP 8) SimpleXMLElement::registerXP ... xmlns:chap="http://example.org/chapter-title"> <title>My Book</title> <chapter id="1"> <chap:title>Chapter 1</chap:title> <para>Donec velit. Nullam eget tellus vitae tortor gravida scelerisque. In orci lorem, cursus imperdiet, ultricies non, hendreri ... t et, orci. Nulla facilisi. Nullam velit nisl, laoreet id, condimentum ut, ultricies id, mauris.</para> </chapter> <chapter id="2"> <chap:title>Chapter 2</chap:title> <para>Lorem ipsum dolor sit amet, consectetuer adipiscing ... am vitae odio. Sed dictum. Ut tincidunt lorem ac lorem. Duis eros tellus, pharetra id, faucibus eu, dapibus dictum, odio.</para> </chapter> </book> EOD; $sxe = new SimpleXMLElement ( $xml ); $sxe -> registerXPathNamespace ( 'c' , 'http://example.org/ ...
https://man.mtool.work/php/8.3/simplexmlelement.registerxpathnamespace.html
次の XPath クエリ用の prefix/ns コンテキストを作成する 10037
« SimpleXMLElement::next SimpleXMLElement::rewind » PHP Manual SimpleXMLElement 次の XPath クエリ用の prefix/ns コンテキストを作成する 検索 SimpleXMLElement::registerXPathNamespace (PHP 5 >= 5.1.0, PHP 7, PHP 8) SimpleXMLElement::registerXP ... xmlns:chap="http://example.org/chapter-title"> <title>My Book</title> <chapter id="1"> <chap:title>Chapter 1</chap:title> <para>Donec velit. Nullam eget tellus vitae tortor gravida scelerisque. In orci lorem, cursus imperdiet, ultricies non, hendreri ... t et, orci. Nulla facilisi. Nullam velit nisl, laoreet id, condimentum ut, ultricies id, mauris.</para> </chapter> <chapter id="2"> <chap:title>Chapter 2</chap:title> <para>Lorem ipsum dolor sit amet, consectetuer adipiscing ... am vitae odio. Sed dictum. Ut tincidunt lorem ac lorem. Duis eros tellus, pharetra id, faucibus eu, dapibus dictum, odio.</para> </chapter> </book> EOD; $sxe = new SimpleXMLElement ( $xml ); $sxe -> registerXPathNamespace ( 'c' , 'http://example.org/ ...
https://man.mtool.work/php/8.3/simplexmlelement.registerxpathnamespace.html
配列構造体に XML データを処理する 9900
« xml_parse xml_parser_create » PHP Manual XML パーサー 関数 配列構造体に XML データを処理する 検索 xml_parse_into_struct (PHP 4, PHP 5, PHP 7, PHP 8) xml_parse_into_struct — 配列構造体に XML データを処理する 説明 function xml_parse_into_st ... 有効な xml resource が期待されていました。 例 以下の例は、この関数により生成された配列の内部構造を示すものです。 note タグを para タグの中に埋 め込んで使用した後、これをパースし、生成された構造体を出力します。 例1 xml_parse_into_struct() の例 <?php $si ... mple = "<para><note>simple note</note></para>" ; $p = xml_parser_create (); xml_parse_into_struct ( $p , $simple , $vals , $index ); ech ... ); echo "\nVals array\n" ; print_r ( $vals ); ?> このコードを実行した場合、出力は次のようになります。 Index array Array ( [PARA] => Array ( [0] => 0 [1] => 2 ) [NOTE] => Array ( [0] => 1 ) ) Vals array Array ( [0] => Array ( [tag] => PARA [type] => o ...
https://man.mtool.work/php/8.3/function.xml-parse-into-struct.html
例 9608
« 定義済み定数 DOMAttr » PHP Manual DOM 例 検索 例 このリファレンスの多くの例で、XMLファイルが必要です。 私たちは、次のような形式の book.xml を使用します。 例1 book.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE book PUBLIC "-//OASIS/ ... ook/xml/4.1.2/docbookx.dtd" [ ]> <book id="listing"> <title>My lists</title> <chapter id="books"> <title>My books</title> <para> <informaltable> <tgroup cols="4"> <thead> <row> <entry>Title</entry> <entry>Author</entry> <entry>Language</entry> <entry ... ry>2253051209</entry> </row> <!-- TODO: I have a lot of remaining books to add.. --> </tbody> </tgroup> </informaltable> </para> </chapter> </book> 関連キーワード: entry row book xml title books open id My chapter para informaltable tgroup thead tbod ...
https://man.mtool.work/php/8.3/dom.examples.html
例 9471
« 定義済み定数 DOMAttr » PHP Manual DOM 例 検索 例 このリファレンスの多くの例で、XMLファイルが必要です。 私たちは、次のような形式の book.xml を使用します。 例1 book.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE book PUBLIC "-//OASIS/ ... ook/xml/4.1.2/docbookx.dtd" [ ]> <book id="listing"> <title>My lists</title> <chapter id="books"> <title>My books</title> <para> <informaltable> <tgroup cols="4"> <thead> <row> <entry>Title</entry> <entry>Author</entry> <entry>Language</entry> <entry ... ry>2253051209</entry> </row> <!-- TODO: I have a lot of remaining books to add.. --> </tbody> </tgroup> </informaltable> </para> </chapter> </book> 関連キーワード: entry book title books chapter para informaltable tgroup thead tbody John Steinbeck 定 ...
https://man.mtool.work/php/8.3/dom.examples.html
XML 外部エンティティの例 9334
« XMLタグのマッピングの例 クラスを使ってXMLをパースする » PHP Manual 例 XML 外部エンティティの例 検索 XML 外部エンティティの例 この例は、XML コードに焦点を当てます。この例は、他のドキュメント をインクルードし処理するための外部エンティティリ ... TY plainEntity "FOO entity"> <!ENTITY systemEntity SYSTEM "xmltest2.xml"> ]> <chapter> <TITLE>Title &plainEntity;</TITLE> <para> <informaltable> <tgroup cols="3"> <tbody> <row><entry>a1</entry><entry morerows="1">b1</entry><entry>c1</entry></row> <ro ... ntry>c2</entry></row> <row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row> </tbody> </tgroup> </informaltable> </para> &systemEntity; <section id="about"> <title>About this Document</title> <para> <!-- this is a comment --> <?php echo 'Hi! ... This is PHP version ' . phpversion(); ?> </para> </section> </chapter> このファイルは、 xmltest.xml からインクルードされます。 例3 xmltest2.xml <?xml version="1.0"?> <!DO ...
https://man.mtool.work/php/8.3/example.xml-external-entity.html
指定した名前空間で、タグ名に対応するすべての要素を検索する 8767
« DOMDocument::getElementsByTagName DOMDocument::importNode » PHP Manual DOMDocument 指定した名前空間で、タグ名に対応するすべての要素を検索する 検索 DOMDocument::getElementsByTagNameNS (PHP 5, PHP 7, PHP 8) DOMDocument::getElementsByTagName ... <<EOD <?xml version="1.0" ?> <chapter xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Books of the other guy..</title> <para> <xi:include href="book.xml"> <xi:fallback> <error>xinclude: book.xml not found</error> </xi:fallback> </xi:include> <incl ... ude> This is another namespace </include> </para> </chapter> EOD; $dom = new DOMDocument ; // 上で定義した XML 文字列を読み込みます $dom -> loadXML ( $xml ); foreach ( $do ... mespace prefix タグ localName DOMNodeList ローカル XInclude fallback element local getElementsByTagName 条件 chapter title para book importNode 履歴 nullable xmlns Books ...
https://man.mtool.work/php/8.3/domdocument.getelementsbytagnamens.html
PREV 1 2 NEXT