XML::DO...listDecl(3)

πŸ’– XML::DOM::AttlistDecl πŸ’–

okay bestie, welcome to the XML::DO...listDecl(3) page from User Contributed Perl Documentation β€” yes, the manual name is a whole little truncated moment, but we’re here for XML::DOM::AttlistDecl, no cap. 🫢


✨ NAME ✨

  • XML::DOM::AttlistDecl β€” an XML ATTLIST declaration in XML::DOM. iconic. πŸ’…

🌸 DESCRIPTION 🌸

XML::DOM::AttlistDecl extends XML::DOM::Node but is not part of the DOM Level 1 specification. πŸ‘€

This node represents an ATTLIST declaration, e.g.:

        <!ATTLIST person
          sex      (male|female)  #REQUIRED
          hair     CDATA          "bold"
          eyes     (none|one|two) "two"
          species  (human)        #FIXED "human">

Each attribute definition is stored a separate AttDef node. The AttDef nodes can be retrieved with getAttDef and added with addAttDef. (The AttDef nodes are stored in a NamedNodeMap internally.) 🧚

✨ METHODS ✨

getName

Returns the Element tagName. ⭐

getAttDef (attrName)

Returns the AttDef node for the attribute with the specified name. πŸ”₯

addAttDef (attrName, type, default, [ fixed ])

Adds a AttDef node for the attribute with the specified name. πŸŽ€

Parameters:

  • attrName β€” the attribute name.
  • type β€” the attribute type (e.g. "CDATA" or "(male|female)".)
  • default β€” the default value enclosed in quotes (!), the string #IMPLIED or the string #REQUIRED.
  • fixed β€” whether the attribute is '#FIXED' (default is 0.)

mwah πŸ’‹ this page’s source/version is perl v5.42.0, dated 2022-05-23, and it lives under XML::DO...listDecl(3) β€” bye bestie, go slay some XML! 🌈✨

πŸ“¦ where this page comes from