XML::XPath::Node(3)
π XML::XPath::Node π
okay bestie, so this is XML::XPath::Node β it's the internal representation of a node, straight out of the User Contributed Perl Documentation section of the manual. yes it's giving "under the hood" energy and we're obsessed π
β¨ API β¨
The Node API is lowkey trying to emulate DOM, but ngl it isn't quite compatible with DOM. the whole point is to ease the transition from XML::DOM programming over to XML::XPath. and the tea is: compatibility with DOM may arise once XML::DOM gets namespace support. until then, we vibe with what we have π
πΈ new
Creates a new node. See the sub-classes for the parameters you pass to new() β they're the ones holding the receipts π«Ά
πΈ getNodeType
Returns one of ELEMENT_NODE, TEXT_NODE, COMMENT_NODE, ATTRIBUTE_NODE, PROCESSING_INSTRUCTION_NODE or NAMESPACE_NODE.
UNKNOWN_NODE gets returned if the sub-class doesn't implement getNodeType β but bestie, that means something is broken! π
The constants are exported by default from XML::XPath::Node, and they have the same numeric value as the XML::DOM versions. matching numbers, matching energy, periodt β¨
πΈ getParentNode
Returns the parent of this node, or undef if this is the root node.
β οΈ note that the root node here is the root node in terms of XPath β not the root element node. iykyk, don't get it twisted π
πΈ to_sax ( $handler | %handlers )
Generates sax calls to the handler or handlers. See the PerlSAX docs for details.
π heads up: this one is not yet implemented correctly. we're being honest about it, fr fr.
π¦ MORE INFO π¦
See the sub-classes for the meaning of the rest of the API β they're the main characters here:
XML::XPath::Node::ElementXML::XPath::Node::AttributeXML::XPath::Node::NamespaceXML::XPath::Node::TextXML::XPath::Node::CommentXML::XPath::Node::PI
and that's the whole page, bestie! this lil gem is from perl v5.42.1, dated 2026-04-21 β shoutout to the User Contributed Perl Documentation crew for keeping the vibes immaculate. slay, bye! πβ¨π
π¦ where this page comes from
- fedora 44: perl-XML-XPath 1.49-1.fc44 Β· Artistic-2.0 AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms