Message::DOM::Document - The DOM |Document| Object


  use Message::DOM::DOMImplementation;
  $dom = Message::DOM::DOMImplementation->new;
  $doc = $dom->create_document;
  is $doc->node_type, $doc->DOCUMENT_NODE;
  $doc->append_child ($doctype);
  $doc->append_child ($element);
  print $doc->inner_html;


The Message::DOM::Document module is used to implement the DOM Document object. The class implements the DOM Document interface, as well as other interfaces that have to be implemented by Document objects, including HTMLDocument and DocumentTraversal.

This module is part of manakai.


A Document object provides DOM methods, attributes, and constants as Perl methods as specified by DOM Perl binding specification. For more information on the bahavior of these methods, see the relevant specifications.

From the Node and EventTarget interfaces

node_type, append_child, ELEMENT_NODE, can_dispatch, and so on. See the Message::DOM::Node manpage for the full list.

From the Document interface (DOM Level 3 Core)

adopt_node, create_attribute, create_attribute_ns, create_cdata_section, create_comment, create_document_fragment, create_element, create_element_ns, create_entity_reference, create_notation, create_processing_instruction, create_text_node, doctype, document_element, document_uri, dom_config, get_element_by_id, get_elements_by_tag_name, get_elements_by_tag_name_ns, implementation, input_encoding, strict_error_checking, xml_encoding, xml_standalone, xml_version.

From the HTMLDocument interface (Web Applications 1.0)

compat_mode, inner_html, ready_state.

From the DocumentEvent interface (DOM Level 3 Events)


From the DocumentStyle interface (CSSOM)


From the DocumentTraversal interface (DOM Level 2 Traversal)


From the DocumentSelector interface (Selectors API)

query_selector, query_selector_all.

From DOM Document Type Definitions module

create_attribute_definition, create_document_type_definition, create_element_type_definition, create_general_entity.

manakai extensions

all_declarations_processed, manakai_charset, manakai_compat_mode, manakai_create_serial_walker, manakai_entity_base_uri, manakai_has_bom, manakai_head, manakai_html, manakai_is_html, manakai_is_srcdoc.


the Message::DOM::DOMImplementation manpage.

the Message::DOM::Node manpage.

Web DOM Core <>.

Web Applications 1.0 <>.


Wakaba <>.


Copyright 2007-2011 Wakaba <>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.