XML::XP...ttribute(3)
β¨ NAME β¨
XML::XPath::Attribute β a single attribute π
okay so bestie, this is from the User Contributed Perl Documentation collection, and it's genuinely one of the cutest little classes you'll ever meet. It's literally just... one attribute. One. A single attribute. That's the whole vibe. A key, a value, maybe a prefix and a namespace if it's feeling fancy π
πΈ API πΈ
π new ( key, value, prefix )
Create a new attribute node. That's it, that's the constructor, she's simple and she knows it β¨
π getName
Returns the key for the attribute. The name. The identifier. The whole point π«Ά
π getLocalName
As getName above, but without namespace information β so it's giving "just the local part, thanks" π
π getNodeValue / getData
Returns the value. Two names, same energy, both slay π
π setNodeValue
Sets the value of the attribute node. Now you're the one in charge, main character energy fr fr π
π getPrefix
Returns the prefix. The little namespace-y bit at the front π
π getNamespace
Return the namespace. Yes bestie, the whole namespace. Iconic π
π toString
Generates key="value", encoded correctly. No cap β the encoding is handled, you don't have to worry about it π
okay that's literally the whole page, she's a short one but she ate π
perl v5.42.1 Β· 2026-04-21 β mwah, that's the version and the date this lil doc was born, and it lives in the XML::XPath::Attribute(3) corner of the manual universe. go forth and attribute responsibly π¦πΈ
π¦ where this page comes from
- fedora 44: perl-XML-XPath 1.49-1.fc44 Β· Artistic-2.0 AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms