Results of 1 - 9 of about 9 for para (0.002 sec.)
- xml_parse_into_struct — 配列構造体に XML データを処理する | PHP 8.3 11486
- xml_parse_into_struct (PHP 4, PHP 5, PHP 7, PHP 8) xml_parse_into_struct — 配列構造体に XML データを処理する 説明 function xml_parse_into_struct ( XMLParser $parser , string $data , array &$values , array &$index = null ): int | false この関
... 有効な 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
- DOMDocument::xinclude — DOMDocument オブジェクト内の XIncludes を置換する | PHP... 11126
- DOMDocument::xinclude (PHP 5, PHP 7, PHP 8) DOMDocument::xinclude — DOMDocument オブジェクト内の XIncludes を置換する 説明 public function DOMDocument::xinclude ( int $options = 0 ): int | false このメソッドは、DOMDocument オブジェクト内の
... <<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
- SimpleXMLElement::registerXPathNamespace — 次の XPath クエリ用の prefix/ns コン... 10425
- SimpleXMLElement::registerXPathNamespace (PHP 5 >= 5.1.0, PHP 7, PHP 8) SimpleXMLElement::registerXPathNamespace — 次の XPath クエリ用の prefix/ns コンテキストを作成する 説明 public function SimpleXMLElement::registerXPathNamespace ( string
... 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 外部エンティティの例 | PHP 8.3 9724
- XML 外部エンティティの例 この例は、XML コードに焦点を当てます。この例は、他のドキュメント をインクルードし処理するための外部エンティティリファレンスのハン ドラの使用法およびPIの処理方法、PIが含むコードに関する"信頼度" を定義する手段を説明し
... 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
- 例 | PHP 8.3 9185
- 例 このリファレンスの多くの例で、XMLファイルが必要です。 私たちは、次のような形式の book.xml を使用します。 例1 book.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-o
... 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> ...
-
https://man.mtool.work/php/8.3/dom.examples.html
- DOMDocument::getElementsByTagNameNS — 指定した名前空間で、タグ名に対応するすべ... 8663
- DOMDocument::getElementsByTagNameNS (PHP 5, PHP 7, PHP 8) DOMDocument::getElementsByTagNameNS — 指定した名前空間で、タグ名に対応するすべての要素を検索する 説明 public function DOMDocument::getElementsByTagNameNS ( ? string $namespace , stri
... <<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 ...
-
https://man.mtool.work/php/8.3/domdocument.getelementsbytagnamens.html
- DOMElement::setAttribute — 属性を新しく追加する、または変更する | PHP 8.3 7082
- DOMElement::setAttribute (PHP 5, PHP 7, PHP 8) DOMElement::setAttribute — 属性を新しく追加する、または変更する 説明 public function DOMElement::setAttribute ( string $qualifiedName , string $value ): DOMAttr | bool qualifiedName という名前の
... 込み専用の場合に発生します。 例 例1 属性を設定する <?php $doc = new DOMDocument ( "1.0" ); $node = $doc -> createElement ( "para" ); $newnode = $doc -> appendChild ( $node ); $newnode -> setAttribute ( "align" , "left" ); ?> 参考 DOMElement::hasAttrib ...
-
https://man.mtool.work/php/8.3/domelement.setattribute.html
- DOMNode::appendChild — 子要素群の最後に新しい子要素を追加する | PHP 8.3 6722
- 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 DOMDoc ...
-
https://man.mtool.work/php/8.3/domnode.appendchild.html
- DOMXPath::query — 与えられた XPath 式を評価する | PHP 8.3 6381
- DOMXPath::query (PHP 5, PHP 7, PHP 8) DOMXPath::query — 与えられた XPath 式を評価する 説明 public function DOMXPath::query ( string $expression , ? DOMNode $contextNode = null , bool $registerNodeNS = true ): mixed 与えられた XPath 式 expre
... load ( 'examples/book-docbook.xml' ); $xpath = new DOMXPath ( $doc ); // root 要素から開始します $query = '//book/chapter/para/informaltable/tgroup/tbody/row/entry[. = "en"]' ; $entries = $xpath -> query ( $query ); foreach ( $entries as $entry ) { ...
-
https://man.mtool.work/php/8.3/domxpath.query.html
PREV
1
NEXT