W3C::DOM

Abstract W3C DOM Level 2 interface roles

W3C::DOM

Synopsis

use W3C::DOM;
sub make-dom-sandwhich(W3C::DOM::Implementation $impl) {
    my W3C::DOM::Document:D $doc = $impl.createDocument(Str, 'sandwhich', W3C::DOM::DocumentType);
    given $doc.documentElement {
        for <bread butter pickles butter bread> -> $ingredient {
            .appendChild: $doc.createElement($ingredient);
        }
    }
    return $doc;
}

# LibXML implements 
use LibXML;
my W3C::DOM::Document $snack = make-dom-sandwhich(LibXML);

This module contains informal interface roles for W3C Level 2 Core DOM. It is used by LibXML to assert basic coverage of the required DOM objects and methods.

Roles/methods in this module

DOM RoleDOM ParentL1 MethodsL2 Methods
W3C::DOM::NodenodeName nodeValue parentNode childNodes firstChild lastChild previousSibling nextSibling ownerDocument insertBefore replaceChild removeChild appendChild hasChildNodes cloneNodenormalize isSupported namespaceURI prefix localName hasAttributes
W3C::DOM::CharacterDataW3C::DOM::Nodedata length substringData appendData insertData deleteData replaceData
W3C::DOM::AttrW3C::DOM::Nodename value specifiedownerElement
W3C::DOM::CDATASectionW3C::DOM::Text
W3C::DOM::CommentW3C::DOM::CharacterData
W3C::DOM::DocumentW3C::DOM::Nodedoctype implementation documentElement createElement createDocumentFragment createTextNode createComment createCDATASection createProcessingInstruction createAttribute createEntityReference getElementsByTagNameimportNode createElementNS createAttributeNS getElementsByTagNameNS getElementById
W3C::DOM::DocumentFragmentW3C::DOM::Node
W3C::DOM::DocumentTypeW3C::DOM::Nodename publicId systemId entities notations
W3C::DOM::ElementW3C::DOM::Nodeattributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagNamegetAttributeNS setAttributeNS removeAttributeNS getAttributeNodeNS setAttributeNodeNS getElementsByTagNameNS hasAttribute hasAttributeNS
W3C::DOM::EntityW3C::DOM::NodepublicId systemId notationName
W3C::DOM::EntityReferenceW3C::DOM::Node
W3C::DOM::ImplementationcreateDocument createDocumentType hasFeature
W3C::DOM::NamedNodeMapgetNamedItem setNamedItem removeNamedItem item lengthgetNamedItemNS setNamedItemNS removeNamedItemNS
W3C::DOM::NotationW3C::DOM::NodepublicId systemId
W3C::DOM::ProcessingInstructionW3C::DOM::Nodetarget data
W3C::DOM::TextW3C::DOM::CharacterDatasplitText

See Also

LibXML which consumes these roles

W3C::DOM v0.0.3

Abstract W3C DOM Level 2 interface roles

Authors

  • David Warring

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • W3C::DOM
  • W3C::DOM::Test

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.