HTML::O...th::Step(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸ’– NAME πŸ’–

okay so bestie, this is the manual page for HTML::Object::XPath::Step β€” the manual name up top is literally HTML::O...th::Step(3) (yes, with the little ellipsis, iykyk), and it's part of the User Contributed Perl Documentation set. Its one-line title is HTML Object XPath Step. That's the whole name situation, slay.

✨ SYNOPSIS ✨

Here's the exact little starter pack, no cap:

use HTML::Object::XPath::Step;
my $this = HTML::Object::XPath::Step->new || die( HTML::Object::XPath::Step->error, "\n" );

πŸŽ€ VERSION πŸŽ€

v0.2.0 β€” that's the version, bestie πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

This module represents a XPath step. That's it. That's the description. It's giving "one job and it ate" ✨

πŸ› οΈ CONSTRUCTOR πŸ› οΈ

new

new takes a HTML::Object::XPath object, an axis, a test name and a literal, and returns a brand-new HTML::Object::XPath::Step object. Constructor behavior: iconic, no notes πŸ’–

🌸 METHODS 🌸

  • as_string β€” returns a string representation of the step. Text-mode glow-up ✨
  • as_xml β€” returns a string representation of the step as XML. Same step, XML flavor πŸ¦‹
  • axis β€” set or get the axis. Direction check, periodt πŸ’…
  • axis_ancestor β€” give it a context and a HTML::Object::XPath::NodeSet object, and it adds each parent until there are none found anymore, then returns the resulting node set. It's climbing the family tree, no cap 🌈
  • axis_ancestor_or_self β€” this performs a similar function as axis_ancestor, except it tests each node and adds it to the result before going up to the next parent. Main character checks themselves first, lowkey πŸ‘‘
  • axis_attribute β€” give it a context and a node set, and it adds each of its attribute objects to the resulting node set and returns it. Attribute girlies, rise πŸŽ€
  • axis_child β€” give it a context and a HTML::Object::XPath::NodeSet object, and it adds each of the children's nodes and returns the resulting set. Child nodes getting their moment πŸ’–
  • axis_descendant β€” give it a context and a HTML::Object::XPath::NodeSet object, and it adds each of the children's nodes and its children after that until there is none, then returns the resulting set. Going down the tree like it's a group chat scroll 😭
  • axis_descendant_or_self β€” this performs a similar function as axis_ancestor, except it tests each node and adds it to the result before going down to the next children's nodes. (Yes bestie, the original really says axis_ancestor here β€” copy-paste moment, but we're keeping the exact tea β˜•)
  • axis_following β€” give it a context and a node set, and it gets all the first child in the tree of the element's next sibling. Following the vibe forward ✨
  • axis_following_sibling β€” give it a context and a node set, and it adds its next sibling to the resulting node set, then its sibling's sibling, and so forth. It returns the resulting node set. Sibling chain, slay 🫢
  • axis_method β€” set or get the axis method. Method to the axis, iykyk πŸ’…
  • axis_namespace β€” give it a context and a node set, and it adds each namespace of the context into the result. Namespace representation matters 🌸
  • axis_parent β€” give it a context and a node set, and it pushes (the original literally says "psh" 😭) the context's parent to the result array, if any. It returns the resulting node set. Parental supervision, but make it XPath πŸ’€
  • axis_preceding β€” give it a context and a node set, and it gets all the last child of the previous sibling hierarchy. It returns the resulting node set. Looking backward, but make it cute πŸ¦‹
  • axis_preceding_sibling β€” give it a context and a node set, and it gets all the previous siblings recursively. It returns the resulting node set. Recursive sibling energy, periodt 🌈
  • axis_self β€” give it a context and a node set, and it returns the node set with the provided context added to it. Self-love, but literally πŸ’–
  • evaluate β€” give it a node set or a node, and it evaluates each element of the node set by calling evaluate_node for each of them, adds the result to a new node set, and returns it. (The original says "nod set" β€” iconic typo, but you know what it means πŸ’€)
  • evaluate_node β€” give it a context, and it evaluates the context by calling the method set in axis_method and passing it the context and a new node set. It returns the new node set. Evaluate era ✨
  • filter_by_predicate β€” give it a node set and a predicate, and it evaluates each element in the node set with the predicate. Based on the result, it adds the node evaluated to a new node set that is returned. Filtering, but make it fashion πŸ’…
  • literal β€” set or get the literal value. Literal queen πŸ‘‘
  • new_nodeset β€” returns a new node set object, passing it whatever arguments were provided. Fresh node set, just dropped πŸŽ€
  • node_test β€” give it a node, and it tests it based on the test set for this step and returns a certain value; most of the time a simple true value. Vibe check, but for nodes 🌸
  • test β€” set or get the test name (or actually number) to be performed. Test name? Test number? It's giving flexible πŸ¦‹
  • test_attribute β€” give it a node, and it tests its attribute. Attribute test, no cap πŸ’–
  • test_namespace β€” give it a node, and it tests its name space. Namespace test, slay 🌈

πŸ‘‘ AUTHOR πŸ‘‘

Jacques Deguest <jack@deguest.jp> β€” author icon, say thank you πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

go read these too, bestie:

  • HTML::Object::XPath
  • HTML::Object::XPath::Boolean
  • HTML::Object::XPath::Expr
  • HTML::Object::XPath::Function
  • HTML::Object::XPath::Literal
  • HTML::Object::XPath::LocationPath
  • HTML::Object::XPath::NodeSet
  • HTML::Object::XPath::Number
  • HTML::Object::XPath::Root
  • HTML::Object::XPath::Step
  • HTML::Object::XPath::Variable
Copyright(c) 2021 DEGUEST Pte. Ltd. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

and that's the whole page, bestie 🫢 β€” the footer tea is perl v5.42.2, dated 2026-02-15, with those User Contributed Perl Documentation vibes. mwah πŸ’‹

πŸ“¦ where this page comes from