XML::S...m::Node(3pm)
okay bestie, welcome to the XML::S...m::Node(3pm) page from the User Contributed Perl Documentation collection π
β¨. This is the one about building and parsing trees, and we're gonna make it make sense, no cap.
πΈ NAME πΈ
XML::Stream::Node β functions to make building and parsing the tree easier to work with. literal group-chat approved.
π¦ SYNOPSIS π¦
ngl, this is just a collection of functions that do not need to be in memory if you choose one of the other methods of data storage. slay.
This creates a hierarchy of Perl objects and provides various methods to manipulate the structure of the tree. It is much like the C library libxml.
π FORMAT π
The result of parsing:
<foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
would be:
[ tag: foo
att: {}
children: [ tag: head
att: {id=>"a"}
children: [ tag: "__xmlstream__:node:cdata"
children: "Hello "
]
[ tag: em
children: [ tag: "__xmlstream__:node:cdata"
children: "there"
]
]
]
[ tag: bar
children: [ tag: "__xmlstream__:node:cdata"
children: "Howdy "
]
[ tag: ref
]
]
[ tag: "__xmlstream__:node:cdata"
children: "do"
]
]
π METHODS π
okay, here's every method, bestie β no skips, no cap π«Ά.
new(),new(tag),new(tag,cdata)β creates a new node. If you specifytag, then the root tag is set. If you specifydata, then cdata is added to the node as well. Returns the created node.get_tag()β returns the root tag of the node.set_tag(tag)β set the root tag of the node totag.add_child(node),add_child(tag),add_child(tag,cdata)β adds the specified node as a child to the current node, or creates a new node with the specifiedtagas the root node. Returns the node added.remove_child(node)β removes the child node from the current node.remove_cdata()β removes all of the cdata children from the current node.add_cdata(string)β adds thestringas cdata onto the current node's child list.get_cdata()β returns all of the cdata children concatenated together into one string.get_attrib(attrib)β returns the value ofattribif it is valid, or returnsundefifattribis not a real attribute.put_attrib(hash)β for each key/value pair specified, create an attribute in the node.remove_attrib(attrib)β remove the specified attribute from the node.add_raw_xml(string,[string,...])β directly add a string into the XML packet as the last child, with no translation.get_raw_xml()β return all of the XML in a single string,undefif there is no raw XML to include.remove_raw_xml()β remove all raw XML strings.children()β return all of the children of the node in a list.attrib()β returns a hash containing all of the attributes on this node.copy()β return a recursive copy of the node.XPath(path)β runXML::Stream::XPathon this node.XPathCheck(path)β runXML::Stream::XPathon this node and return1or0to see if it matches or not.GetXML()β return the node in XML string form.
π AUTHOR π
By Ryan Eatmon in June 2002 for http://jabber.org/ π. Currently maintained by Darian Anthony Patrick.
π COPYRIGHT π
Copyright (C) 1998-2004 Jabber Software Foundation http://jabber.org/
This module licensed under the LGPL, version 2.1.
mwah π that's the whole page β source/version perl v5.42.0, dated 2015-02-06, and the header title is XML::S...m::Node(3pm). bye bestie π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-XML-Stream 1.24-bp160.1.3 Β· LGPL-2.1+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms