.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "DOM-ecmascript 3pm" .TH DOM-ecmascript 3pm "2018-07-12" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DOM\-ecmascript \- XML::Grove and ECMA Script Language Binding .SH "XML::Grove and DOM Level One" .IX Header "XML::Grove and DOM Level One" XML::Grove is similar in concept to the \s-1ECMA\s0 Script Language Binding to \s-1DOM\s0 Level 1 Core (Appendix E of the \s-1DOM\s0 Recommendation). .PP http://www.w3.org/TR/REC\-DOM\-Level\-1/ ecma\-script\-language\-binding.html .PP The \s-1ECMA\s0 Script Language Binding presents \s-1DOM\s0 properties as \s-1ECMA\s0 Script object properties. The same is true for XML::Grove, XML::Grove presents \s-1DOM\s0 properties as Perl blessed hashes. .PP The biggest difference between the \s-1ECMA\s0 Script Language Binding and XML::Grove is that XML::Grove uses a Perl hash for nodes, Perl arrays for NodeLists, Perl hashes for NamedNodeLists so those object classes don't exist in XML::Grove. Because those classes don't exist, you use ordinary Perl syntax for manipulating the \s-1DOM\s0 properties (lists and named node lists) instead of methods like `\f(CW\*(C`nextSibling()\*(C'\fR' or `\f(CW\*(C`replaceChild()\*(C'\fR'. Element attributes in XML::Grove are stored in Perl hashes; attribute types are available through the document object. .PP Another difference is that XML::Grove attempts to marry the PerlSAX and \s-1DOM\s0 naming so that less (no?) name-changing occurs between using PerlSAX interfaces and filters and \s-1DOM\s0 modules. Where conflicts occur, the PerlSAX naming is used. .PP XML::Grove uses a blessed hash for nodes, so the node type is available using Perl's `\f(CW\*(C`ref()\*(C'\fR' instead of using a `\f(CW\*(C`nodeType()\*(C'\fR' method and all class names are prefixed with `\f(CW\*(C`XML::Grove::\*(C'\fR'. .PP The following object descriptions are the most basic and common provided by many PerlSAX parsers. PerlSAX parsers often provide additional properties or objects, refer to your PerlSAX parser documentation for details. .SH "Document Object Model Level 1 Core" .IX Header "Document Object Model Level 1 Core" .SS "Object XML::Grove::Document" .IX Subsection "Object XML::Grove::Document" .IP "Contents" 12 .IX Item "Contents" The children of this object. This property is an array. .IP "Entities" 12 .IX Item "Entities" The entities declared in this document. This property is a hash of XML::Grove::Entity objects keyed by entity name. .IP "Notations" 12 .IX Item "Notations" The notations declared in this document. This property is a hash of XML::Grove::Notation objects keyed by notation name. .SS "Object XML::Grove::Element" .IX Subsection "Object XML::Grove::Element" .IP "Name" 12 .IX Item "Name" The tag type name for this element. This property is a string. .IP "Attributes" 12 .IX Item "Attributes" The attributes for this element. This property is a hash and it's hash values are strings (or arrays with some grove builders). .IP "Contents" 12 .IX Item "Contents" The children of this object. This property is an array of XML::Grove objects. .SS "Object XML::Grove::Characters" .IX Subsection "Object XML::Grove::Characters" .IP "Data" 12 .IX Item "Data" The text of the character data. This property is a string. .SS "Object XML::Grove::Comment" .IX Subsection "Object XML::Grove::Comment" .IP "Data" 12 .IX Item "Data" The text of the character data. This property is a string. .SS "Object XML::Grove::CData" .IX Subsection "Object XML::Grove::CData" The \f(CW\*(C`CData\*(C'\fR object is called a \f(CW\*(C`CDATASection\*(C'\fR in \s-1DOM.\s0 .IP "Data" 12 .IX Item "Data" The text of the character data. This property is a string. .SS "Object XML::Grove::Notation" .IX Subsection "Object XML::Grove::Notation" .IP "Name" 12 .IX Item "Name" The name of this notation. This property is a string. .IP "SystemId" 12 .IX Item "SystemId" The system identifier of this notation. This property is a string. .IP "PublicId" 12 .IX Item "PublicId" The public identifier of this notation. This property is a string. .SS "Object XML::Grove::Entity" .IX Subsection "Object XML::Grove::Entity" .IP "Name" 12 .IX Item "Name" The name of this entity. This property is a string. .IP "SystemId" 12 .IX Item "SystemId" The system identifier of this notation. This property is a string. .IP "PublicId" 12 .IX Item "PublicId" The public identifier of this notation. This property is a string. .IP "Notation" 12 .IX Item "Notation" The notation declared for this entity. This property is either the name of the notation as a string or an \f(CW\*(C`XML::Grove::Notation\*(C'\fR object. .SS "Object XML::Grove::PI" .IX Subsection "Object XML::Grove::PI" The \f(CW\*(C`PI\*(C'\fR object is called a \f(CW\*(C`ProcessingInstruction\*(C'\fR in \s-1DOM.\s0 .IP "Target" 12 .IX Item "Target" The target of the processing instruction. This property is a string. .IP "Data" 12 .IX Item "Data" The text of the processing instruction. This property is a string.