1/* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16#include <util/domcore/DocumentImpl.h> 17 18 19const DOMString DocumentImpl::nodeName = "#DOCUMENT"; 20 21/** see DocumentImpl.h */ 22DocumentImpl::DocumentImpl() 23{ 24 25} 26 27/** see DocumentImpl.h */ 28ElementImpl* DocumentImpl::getDocumentElement() const 29{ 30 return NULL; 31} 32 33/** see DocumentImpl.h */ 34ElementImpl* DocumentImpl::createElement(const DOMString* tagName) const throw (DOMException) 35{ 36 return NULL; 37} 38 39/** see DocumentImpl.h */ 40TextImpl* DocumentImpl::createTextNode(const DOMString* data) const 41{ 42 TextImpl* text = new TextImpl(data); 43 44 if (text != NULL) 45 text->setDocument(this); 46 47 return text; 48} 49 50/** see DocumentImpl.h */ 51NodeListImpl* DocumentImpl::getElementsByTagName(const DOMString* tagname) const 52{ 53 ElementImpl* element = getDocumentElement(); 54 NodeListImpl* list = NULL; 55 56 if (element != NULL) 57 list = element->getElementsByTagName(tagname); 58 59 return list; 60} 61 62/** see DocumentImpl.h */ 63const DOMString* DocumentImpl::getNodeName() const 64{ 65 return &nodeName; 66} 67 68/** see DocumentImpl.h */ 69NodeType DocumentImpl::getNodeType() const 70{ 71 return DOCUMENT_NODE; 72} 73 74/** see DocumentImpl.h */ 75DocumentImpl::~DocumentImpl() 76{ 77 78} 79 80