1XML::XPath::Node(3) User Contributed Perl Documentation XML::XPath::Node(3)
2
3
4
6 XML::XPath::Node - internal representation of a node
7
9 The Node API aims to emulate DOM to some extent, however the API isn't
10 quite compatible with DOM. This is to ease transition from XML::DOM
11 programming to XML::XPath. Compatibility with DOM may arise once
12 XML::DOM gets namespace support.
13
14 new
15 Creates a new node. See the sub-classes for parameters to pass to
16 new().
17
18 getNodeType
19 Returns one of ELEMENT_NODE, TEXT_NODE, COMMENT_NODE, ATTRIBUTE_NODE,
20 PROCESSING_INSTRUCTION_NODE or NAMESPACE_NODE. UNKNOWN_NODE is returned
21 if the sub-class doesn't implement getNodeType - but that means
22 something is broken! The constants are exported by default from
23 XML::XPath::Node. The constants have the same numeric value as the
24 XML::DOM versions.
25
26 getParentNode
27 Returns the parent of this node, or undef if this is the root node.
28 Note that the root node is the root node in terms of XPath - not the
29 root element node.
30
31 to_sax ( $handler | %handlers )
32 Generates sax calls to the handler or handlers. See the PerlSAX docs
33 for details (not yet implemented correctly).
34
36 See the sub-classes for the meaning of the rest of the API:
37
38 · XML::XPath::Node::Element
39
40 · XML::XPath::Node::Attribute
41
42 · XML::XPath::Node::Namespace
43
44 · XML::XPath::Node::Text
45
46 · XML::XPath::Node::Comment
47
48 · XML::XPath::Node::PI
49
50
51
52perl v5.32.0 2020-07-28 XML::XPath::Node(3)