{"id":362,"date":"2015-02-24T07:54:09","date_gmt":"2015-02-24T07:54:09","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=362"},"modified":"2017-11-25T11:09:20","modified_gmt":"2017-11-25T11:09:20","slug":"the-xml-module","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=362","title":{"rendered":"The xml module"},"content":{"rendered":"<p>The <code>xml<\/code> module is an extension module, and provides functions to manipulate XML documents: reading nodes, and changing nodes and properties. \u00a0Creating XML documents is done by other modules, such as <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=327\"><code>idmef<\/code><\/a> or <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=331\"><code>iodef<\/code><\/a>.<\/p>\n<h3>Configuration options<\/h3>\n<p>None.<\/p>\n<h3>Primitives<\/h3>\n<ul>\n<li><strong><code>xml_get_str<\/code><\/strong> : <code>xmldoc<\/code>, <code>str<\/code> \u2192 <code>str<\/code><br \/>\nget value from a node in an XML document<\/p>\n<ul>\n<li>usage: <code>xml_get_str<\/code>(<em>xml-document<\/em>, <em>path<\/em>)<br \/>\nfetches value of node referenced by <em>path<\/em> in <em>xml-document<\/em><\/li>\n<li>returns: a string, if <em>path<\/em> is a valid XPath path in <em>xml-document<\/em>, the undefined null object otherwise<\/li>\n<\/ul>\n<\/li>\n<li><strong><code>xml_set_str<\/code><\/strong> : <code>xmldoc<\/code>, <code>str<\/code>,\u00a0<code>str<\/code> \u2192 <code>int<\/code><br \/>\nset node value\u00a0 in an XML document, creating it if necessary<\/p>\n<ul>\n<li>usage: <code>xml_set_str<\/code>(<em>xml-document<\/em>, <em>path<\/em>, <em>value<\/em>)<br \/>\nsets value of node referenced by <em>path<\/em> in <em>xml-document<\/em> to <em>value<\/em><\/li>\n<li>returns: 1 (true) if <em>path<\/em> is a valid XPath path in <em>xml-document<\/em>, 0 (false) otherwise<\/li>\n<\/ul>\n<\/li>\n<li><strong><code>xml_set_prop<\/code><\/strong> : <code>xmldoc<\/code>, <code>str<\/code>,\u00a0<code>str<\/code>,\u00a0<code>str<\/code> \u2192 <code>int<\/code><br \/>\nset node property (a.k.a., attribute)\u00a0 in an XML document, creating it if necessary<\/p>\n<ul>\n<li>usage: <code>xml_set_prop<\/code>(<em>xml-document<\/em>, <em>path<\/em>, <em>property<\/em>,<em> value<\/em>)<br \/>\nsets property\u00a0<em>property<\/em> of node referenced by <em>path<\/em> in <em>xml-document<\/em> to <em>value<\/em><\/li>\n<li>returns: 1 (true) if <em>path<\/em> is a valid XPath path in <em>xml-document<\/em>, 0 (false) otherwise<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The xml module is an extension module, and provides functions to manipulate XML documents: reading nodes, and changing nodes and properties. \u00a0Creating XML documents is done by other modules, such as idmef or iodef. Configuration options None. Primitives xml_get_str : xmldoc, str \u2192 str get value from a node in an XML document usage: xml_get_str(xml-document, &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=362\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The xml module<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-362","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=362"}],"version-history":[{"count":3,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/362\/revisions"}],"predecessor-version":[{"id":660,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/362\/revisions\/660"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}