One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
Macaulay2
/
XML
/
html
/
View File Name :
___Libxml__Node.html
<!DOCTYPE html> <html lang="en"> <head> <title>LibxmlNode -- the class of all XML nodes created by libxml2</title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link type="text/css" rel="stylesheet" href="../../../../Macaulay2/Style/doc.css"> <link rel="stylesheet" href="../../../../Macaulay2/Style/katex/katex.min.css"> <script defer="defer" src="../../../../Macaulay2/Style/katex/katex.min.js"></script> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/auto-render.min.js"></script> <script> var macros = { "\\break": "\\\\", "\\ZZ": "\\mathbb{Z}", "\\NN": "\\mathbb{N}", "\\QQ": "\\mathbb{Q}", "\\RR": "\\mathbb{R}", "\\CC": "\\mathbb{C}", "\\PP": "\\mathbb{P}" }, delimiters = [ { left: "$$", right: "$$", display: true}, { left: "\\[", right: "\\]", display: true}, { left: "$", right: "$", display: false}, { left: "\\(", right: "\\)", display: false} ], ignoredTags = [ "kbd", "var", "samp", "script", "noscript", "style", "textarea", "pre", "code", "option" ]; document.addEventListener("DOMContentLoaded", function() { renderMathInElement(document.body, { delimiters: delimiters, macros: macros, ignoredTags: ignoredTags, trust: true }); }); </script> <style>.katex { font-size: 1em; }</style> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/copy-tex.min.js"></script> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/render-a11y-string.min.js"></script> <script src="../../../../Macaulay2/Style/prism.js"></script> <script>var current_version = '1.25.06';</script> <script src="../../../../Macaulay2/Style/version-select.js"></script> <link type="image/x-icon" rel="icon" href="../../../../Macaulay2/Style/icon.gif"> </head> <body> <div id="buttons"> <div> <a href="https://macaulay2.com/">Macaulay2</a> <span id="version-select-container"></span> » <a title="Macaulay2 documentation" href="../../Macaulay2Doc/html/index.html">Documentation </a> <br><a href="../../Macaulay2Doc/html/_packages_spprovided_spwith_sp__Macaulay2.html">Packages</a> » <span><a title="an XML parser" href="index.html">XML</a> :: <a title="the class of all XML nodes created by libxml2" href="___Libxml__Node.html">LibxmlNode</a></span> </div> <div class="right"> <form method="get" action="https://www.google.com/search"> <input placeholder="Search" type="text" name="q" value=""> <input type="hidden" name="q" value="site:macaulay2.com/doc"> </form> <a href="_parse_lp__String_rp.html">next</a> | <a href="___Libxml__Attribute.html">previous</a> | <a href="_parse_lp__String_rp.html">forward</a> | <a href="___Libxml__Attribute.html">backward</a> | up | <a href="master.html">index</a> | <a href="toc.html">toc</a> </div> </div> <hr> <div> <h1>LibxmlNode -- the class of all XML nodes created by libxml2</h1> <div> <h2>Description</h2> <div> <p></p> <p>Each XML node created by <span class="tt">libxml2</span> has: if it is an <em>element</em> (as determined by <a title="whether an XML node is an element" href="_xml__Is__Element_lp__Libxml__Node_rp.html">xmlIsElement</a>), an optional element <em>name</em>, which is a string and is obtained with <a title="get the name of an XML node or attribute" href="_xml__Get__Name.html">xmlGetName</a>; if it is <em>text</em> (as determined by <a title="whether an XML node is text" href="_xml__Is__Text_lp__Libxml__Node_rp.html">xmlIsText</a>), an optional <em>content</em> string, obtained with <a title="get the string content of an XML text node" href="_xml__Get__Content_lp__Libxml__Node_rp.html">xmlGetContent</a>; a linked list of <em>attributes</em> of type <a title="the class of all XML attributes created by the library libxml" href="___Libxml__Attribute.html">LibxmlAttribute</a>; a linked list of <em>children</em> (which are XML nodes), obtained with <a title="get the first child of an XML node or attribute" href="_xml__First__Child.html">xmlFirstChild</a>; and a pointer its next <em>sibling</em>, obtained with <a title="get the next XML node or attribute" href="_xml__Get__Next.html">xmlGetNext</a>.</p> <p>XML nodes are mutable.</p> <p>Internally, a pointer to the XML document containing the node accompanies the node.</p> <p>Let's use <a title="parse a string containing XML" href="_xml__Parse_lp__String_rp.html">xmlParse</a> to make an XML node.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i1 : n = xmlParse ///<foo> aabc <bar id="foo" name="too"> asdf </bar><coo/><coo>hi</coo><coo a="b">hi</coo></foo>/// o1 = <foo> aabc <bar id="foo" name="too"> asdf </bar><coo/><coo>hi</coo><coo a="b">hi</coo></foo> o1 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i2 : xmlIsElement n, xmlIsText n o2 = (true, false) o2 : Sequence</code></pre> </td> </tr> </table> <div> <p>Since it is an element, we may use <a title="get the name of an XML node or attribute" href="_xml__Get__Name.html">xmlGetName</a> to get its name.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i3 : xmlGetName n o3 = foo</code></pre> </td> </tr> </table> <div> <p>We use <a title="get the first child of an XML node or attribute" href="_xml__First__Child.html">xmlFirstChild</a> to get the first node in the linked list of children, which happens to be text:</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i4 : c = xmlFirstChild n o4 = " aabc " o4 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i5 : xmlIsElement c, xmlIsText c o5 = (false, true) o5 : Sequence</code></pre> </td> </tr> </table> <div> <p>We may follow the linked list of children of <span class="tt">n</span>.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i6 : c o6 = " aabc " o6 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i7 : bar = xmlGetNext oo o7 = <bar id="foo" name="too"> asdf </bar> o7 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i8 : xmlGetNext oo o8 = <coo/> o8 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i9 : xmlGetNext oo o9 = <coo>hi</coo> o9 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i10 : xmlGetNext oo o10 = <coo a="b">hi</coo> o10 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i11 : xmlGetNext oo</code></pre> </td> </tr> </table> <div> <p>Let's examine the attributes of <span class="tt">bar</span>.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i12 : xmlFirstAttribute bar o12 = id = "foo" o12 : LibxmlAttribute</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i13 : a = xmlGetNext oo o13 = name = "too" o13 : LibxmlAttribute</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i14 : xmlGetNext oo</code></pre> </td> </tr> </table> <div> <p>We may disassemble an attribute as follows.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i15 : xmlGetName a o15 = name</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i16 : b = xmlFirstChild a o16 = "too" o16 : LibxmlNode (xmlTypeDescription)</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i17 : xmlGetNext oo</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i18 : xmlIsText b o18 = true</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i19 : toString b o19 = too</code></pre> </td> </tr> </table> <div> <p>There are other functions that retrieve the entire list of attributes or children.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">i20 : getChildren n o20 = {" aabc " } {<bar id="foo" name="too"> asdf </bar>} {<coo/> } {<coo>hi</coo> } {<coo a="b">hi</coo> } o20 : VerticalList</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i21 : class \ oo o21 = {LibxmlNode} {LibxmlNode} {LibxmlNode} {LibxmlNode} {LibxmlNode} o21 : VerticalList</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i22 : getAttributes bar o22 = {id = "foo" } {name = "too"} o22 : VerticalList</code></pre> </td> </tr> <tr> <td> <pre><code class="language-macaulay2">i23 : class \ oo o23 = {LibxmlAttribute} {LibxmlAttribute} o23 : VerticalList</code></pre> </td> </tr> </table> </div> <div> <div class="waystouse"> <h2>Functions and methods returning an object of class LibxmlNode:</h2> <ul> <li><span><kbd>toLibxmlNode</kbd> -- see <span><a title="convert a hashtable of type XMLnode to an object of type LibxmlNode" href="_to__Libxml__Node_lp__X__M__Lnode_rp.html">toLibxmlNode(XMLnode)</a> -- convert a hashtable of type XMLnode to an object of type LibxmlNode</span></span></li> <li><span><a title="add an element to an XML node" href="_xml__Add__Element_lp__Libxml__Node_cm__String_rp.html">xmlAddElement(LibxmlNode,String)</a> -- add an element to an XML node</span></li> <li><span><a title="add text to an XML node" href="_xml__Add__Text_lp__Libxml__Node_cm__String_rp.html">xmlAddText(LibxmlNode,String)</a> -- add text to an XML node</span></li> <li><span><kbd>xmlFirstChild(LibxmlAttribute)</kbd> -- see <span><a title="get the first child of an XML node or attribute" href="_xml__First__Child.html">xmlFirstChild</a> -- get the first child of an XML node or attribute</span></span></li> <li><span><kbd>xmlFirstChild(LibxmlNode)</kbd> -- see <span><a title="get the first child of an XML node or attribute" href="_xml__First__Child.html">xmlFirstChild</a> -- get the first child of an XML node or attribute</span></span></li> <li><span><kbd>xmlGetNext(LibxmlNode)</kbd> -- see <span><a title="get the next XML node or attribute" href="_xml__Get__Next.html">xmlGetNext</a> -- get the next XML node or attribute</span></span></li> <li><span><a title="create the root node of an XML document" href="_xml__New__Root_lp__String_rp.html">xmlNewRoot(String)</a> -- create the root node of an XML document</span></li> <li><span><a title="parse a string containing XML" href="_xml__Parse_lp__String_rp.html">xmlParse(String)</a> -- parse a string containing XML</span></li> </ul> <h2>Methods that use an object of class LibxmlNode:</h2> <ul> <li><span><a title="get the list of attributes of an XML node" href="_get__Attributes_lp__Libxml__Node_rp.html">getAttributes(LibxmlNode)</a> -- get the list of attributes of an XML node</span></li> <li><span><kbd>getChildren(LibxmlNode)</kbd> -- see <span><a title="get the list of children of an XML node" href="_get__Children.html">getChildren</a> -- get the list of children of an XML node</span></span></li> <li><span><a title="convert an object of type LibxmlNode to a hashtable of type XMLnode" href="_to__X__M__Lnode_lp__Libxml__Node_rp.html">toXMLnode(LibxmlNode)</a> -- convert an object of type LibxmlNode to a hashtable of type XMLnode</span></li> <li><span><a title="add an attribute to an XML node" href="_xml__Add__Attribute_lp__Libxml__Node_cm__String_cm__String_rp.html">xmlAddAttribute(LibxmlNode,String,String)</a> -- add an attribute to an XML node</span></li> <li><span><a title="get the first attribute of an XML node" href="_xml__First__Attribute_lp__Libxml__Node_rp.html">xmlFirstAttribute(LibxmlNode)</a> -- get the first attribute of an XML node</span></li> <li><span><a title="get the string content of an XML text node" href="_xml__Get__Content_lp__Libxml__Node_rp.html">xmlGetContent(LibxmlNode)</a> -- get the string content of an XML text node</span></li> <li><span><kbd>xmlGetName(LibxmlNode)</kbd> -- see <span><a title="get the name of an XML node or attribute" href="_xml__Get__Name.html">xmlGetName</a> -- get the name of an XML node or attribute</span></span></li> <li><span><a title="whether an XML node is an element" href="_xml__Is__Element_lp__Libxml__Node_rp.html">xmlIsElement(LibxmlNode)</a> -- whether an XML node is an element</span></li> <li><span><a title="whether an XML node is text" href="_xml__Is__Text_lp__Libxml__Node_rp.html">xmlIsText(LibxmlNode)</a> -- whether an XML node is text</span></li> <li><span><a title="the type code for an XML node" href="_xml__Type_lp__Libxml__Node_rp.html">xmlType(LibxmlNode)</a> -- the type code for an XML node</span></li> <li><span><a title="the type description for an XML node" href="_xml__Type__Description_lp__Libxml__Node_rp.html">xmlTypeDescription(LibxmlNode)</a> -- the type description for an XML node</span></li> </ul> </div> <div class="waystouse"> <h2>For the programmer</h2> <p>The object <a title="the class of all XML nodes created by libxml2" href="___Libxml__Node.html">LibxmlNode</a> is <span>a <a title="the class of all mutable types" href="../../Macaulay2Doc/html/___Type.html">type</a></span>, with ancestor class <a title="the class of all things" href="../../Macaulay2Doc/html/___Thing.html">Thing</a>.</p> </div> <hr> <div class="waystouse"> <p>The source of this document is in <span class="tt">XML.m2:662:0</span>.</p> </div> </div> </div> </body> </html>