1DOM-ecmascript(3)     User Contributed Perl Documentation    DOM-ecmascript(3)
2
3
4

XML::Grove and DOM Level One

6       XML::Grove is similar in concept to the ECMA Script Language Binding to
7       DOM Level 1 Core (Appendix E of the DOM Recommendation).
8
9       <http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-bind
10       ing.html>
11
12       The ECMA Script Language Binding presents DOM properties as ECMA Script
13       object properties.  The same is true for XML::Grove, XML::Grove
14       presents DOM properties as Perl blessed hashes.
15
16       The biggest difference between the ECMA Script Language Binding and
17       XML::Grove is that XML::Grove uses a Perl hash for nodes, Perl arrays
18       for NodeLists, Perl hashes for NamedNodeLists so those object classes
19       don't exist in XML::Grove.  Because those classes don't exist, you use
20       ordinary Perl syntax for manipulating the DOM properties (lists and
21       named node lists) instead of methods like `"nextSibling()"' or
22       `"replaceChild()"'.  Element attributes in XML::Grove are stored in
23       Perl hashes; attribute types are available through the document object.
24
25       Another difference is that XML::Grove attempts to marry the PerlSAX and
26       DOM naming so that less (no?) name-changing occurs between using Perl‐
27       SAX interfaces and filters and DOM modules.  Where conflicts occur, the
28       PerlSAX naming is used.
29
30       XML::Grove uses a blessed hash for nodes, so the node type is available
31       using Perl's `"ref()"' instead of using a `"nodeType()"' method and all
32       class names are prefixed with `"XML::Grove::"'.
33
34       The following object descriptions are the most basic and common pro‐
35       vided by many PerlSAX parsers.  PerlSAX parsers often provide addi‐
36       tional properties or objects, refer to your PerlSAX parser documenta‐
37       tion for details.
38

Document Object Model Level 1 Core

40       Object XML::Grove::Document
41
42       Contents    The children of this object.  This property is an array.
43
44       Entities    The entities declared in this document.  This property is a
45                   hash of XML::Grove::Entity objects keyed by entity name.
46
47       Notations   The notations declared in this document.  This property is
48                   a hash of XML::Grove::Notation objects keyed by notation
49                   name.
50
51       Object XML::Grove::Element
52
53       Name        The tag type name for this element.  This property is a
54                   string.
55
56       Attributes  The attributes for this element.  This property is a hash
57                   and it's hash values are strings (or arrays with some grove
58                   builders).
59
60       Contents    The children of this object.  This property is an array of
61                   XML::Grove objects.
62
63       Object XML::Grove::Characters
64
65       Data        The text of the character data.  This property is a string.
66
67       Object XML::Grove::Comment
68
69       Data        The text of the character data.  This property is a string.
70
71       Object XML::Grove::CData
72
73       The "CData" object is called a "CDATASection" in DOM.
74
75       Data        The text of the character data.  This property is a string.
76
77       Object XML::Grove::Notation
78
79       Name        The name of this notation.  This property is a string.
80
81       SystemId    The system identifier of this notation.  This property is a
82                   string.
83
84       PublicId    The public identifier of this notation.  This property is a
85                   string.
86
87       Object XML::Grove::Entity
88
89       Name        The name of this entity.  This property is a string.
90
91       SystemId    The system identifier of this notation.  This property is a
92                   string.
93
94       PublicId    The public identifier of this notation.  This property is a
95                   string.
96
97       Notation    The notation declared for this entity.  This property is
98                   either the name of the notation as a string or an
99                   "XML::Grove::Notation" object.
100
101       Object XML::Grove::PI
102
103       The "PI" object is called a "ProcessingInstruction" in DOM.
104
105       Target      The target of the processing instruction.  This property is
106                   a string.
107
108       Data        The text of the processing instruction.  This property is a
109                   string.
110
111
112
113perl v5.8.8                       1999-08-25                 DOM-ecmascript(3)
Impressum