{"id":7088,"date":"2022-12-20T19:35:14","date_gmt":"2022-12-20T22:35:14","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/xmllibxmlpi-man3\/"},"modified":"2022-12-20T19:35:14","modified_gmt":"2022-12-20T22:35:14","slug":"xmllibxmlpi-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/xmllibxmlpi-man3\/","title":{"rendered":"XML::LibXML::PI (man3)"},"content":{"rendered":"<h1 align=\"center\">XML::LibXML::PI<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a><br \/> <a href=\"#VERSION\">VERSION<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a><br \/> <a href=\"#LICENSE\">LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">XML::LibXML::PI \u2212 XML::LibXML Processing Instructions<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use XML::LibXML; <br \/> # Only methods specific to Processing Instruction nodes are listed here, <br \/> # see the XML::LibXML::Node manpage for other methods <br \/> $pinode\u2212>setData( $data_string ); <br \/> $pinode\u2212>setData( name=>string_value [&#8230;] );<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Processing instructions are implemented with XML::LibXML with read and write access. The <small>PI<\/small> data is the <small>PI<\/small> without the <small>PI<\/small> target (as specified in <small>XML 1.0<\/small> [17]) as a string. This string can be accessed with getData as implemented in XML::LibXML::Node.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The write access is aware about the fact, that many processing instructions have attribute like data. Therefore <b>setData()<\/b> provides besides the <small>DOM<\/small> spec conform Interface to pass a set of named parameter. So the code segment<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">my $pi = $dom\u2212>createProcessingInstruction(&#8220;abc&#8221;); <br \/> $pi\u2212>setData(foo=>&#8217;bar&#8217;, foobar=>&#8217;foobar&#8217;); <br \/> $dom\u2212>appendChild( $pi );<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">will result the following <small>PI<\/small> in the <small>DOM:<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><?abc foo=\"bar\" foobar=\"foobar\"?><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Which is how it is specified in the <small>DOM<\/small> specification. This three step interface creates temporary a node in perl space. This can be avoided while using the <b>insertProcessingInstruction()<\/b> method. Instead of the three calls described above, the call<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$dom\u2212>insertProcessingInstruction(&#8220;abc&#8221;,&#8217;foo=&#8221;bar&#8221; foobar=&#8221;foobar&#8221;&#8216;);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">will have the same result as above.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">XML::LibXML::PI\u2019s implementation of <b>setData()<\/b> documented below differs a bit from the standard version as available in XML::LibXML::Node: <br \/> setData<\/p>\n<p style=\"margin-left:17%;\">$pinode\u2212>setData( $data_string ); <br \/> $pinode\u2212>setData( name=>string_value [&#8230;] );<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This method allows one to change the content data of a <small>PI.<\/small> Additionally to the interface specified for <small>DOM<\/small> Level2, the method provides a named parameter interface to set the data. This parameter list is converted into a string before it is appended to the <small>PI.<\/small><\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Matt Sergeant, Christian Glahn, Petr Pajas<\/p>\n<h2>VERSION <a name=\"VERSION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">2.0206<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">2001\u22122007, AxKit.com Ltd.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">2002\u22122006, Christian Glahn.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">2006\u22122009, Petr Pajas.<\/p>\n<h2>LICENSE <a name=\"LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is free software; you can redistribute it and\/or modify it under the same terms as Perl itself.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  XML::LibXML::PI \u2212 XML::LibXML Processing Instructions <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3432],"class_list":["post-7088","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-xmllibxmlpi"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7088"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7088\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}