def create_xml_declaration(version, encoding)
      declNode = XmlDeclarationNode.new() {
        @attributes << XmlAttribute.new() {@name='version'; @value=version}
        @attributes << XmlAttribute.new() {@name='encoding'; @value=encoding}
      }

      declNode.xml_document = self

      declNode
    end
def create_xml_declaration(version, encoding)
      declNode = XmlDeclarationNode.new() {
        @attributes << XmlAttribute.new() {@name='version'; @value=version}
        @attributes << XmlAttribute.new() {@name='encoding'; @value=encoding}
      }

      declNode.xml_document = self

      declNode
    end
XmlDocument.new()
 XmlDeclarationNode create_xml_declaration(string version, string encoding)
 Returns a node that will appear at the beginning of the document as:
 <?xml version="[ver]" encoding="[enc]" ?>
 The node must still be added to the parent (root) node with XmlNode#append_child.