1XPath::Node::Element(3)User Contributed Perl DocumentatioXnPath::Node::Element(3)
2
3
4

NAME

6       Element - an <element>
7

API

9       new ( name, prefix )
10
11       Create a new Element node with name "name" and prefix "prefix". The
12       name be "prefix:local" if prefix is defined. I know that sounds wierd,
13       but it works ;-)
14
15       getName
16
17       Returns the name (including "prefix:" if defined) of this element.
18
19       getLocalName
20
21       Returns just the local part of the name (the bit after "prefix:").
22
23       getChildNodes
24
25       Returns the children of this element. In list context returns a list.
26       In scalar context returns an array ref.
27
28       getChildNode ( pos )
29
30       Returns the child at position pos.
31
32       appendChild ( childnode )
33
34       Appends the child node to the list of current child nodes.
35
36       getAttribute ( name )
37
38       Returns the attribute node with key name.
39
40       getAttributes / getAttributeNodes
41
42       Returns the attribute nodes. In list context returns a list. In scalar
43       context returns an array ref.
44
45       appendAttribute ( attrib_node)
46
47       Appends the attribute node to the list of attributes (XML::XPath stores
48       attributes in order).
49
50       getNamespace ( prefix )
51
52       Returns the namespace node by the given prefix
53
54       getNamespaces / getNamespaceNodes
55
56       Returns the namespace nodes. In list context returns a list. In scalar
57       context returns an array ref.
58
59       appendNamespace ( ns_node )
60
61       Appends the namespace node to the list of namespaces.
62
63       getPrefix
64
65       Returns the prefix of this element
66
67       getExpandedName
68
69       Returns the expanded name of this element (not yet implemented right).
70
71       string_value
72
73       For elements, the string_value is the concatenation of all string_val‐
74       ues of all text-descendants of the element node in document order.
75
76       toString ( [ norecurse ] )
77
78       Output (and all children) the node to a string. Doesn't process chil‐
79       dren if the norecurse option is a true value.
80
81
82
83perl v5.8.8                       2001-06-12           XPath::Node::Element(3)
Impressum