1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XDocument_idl__ 25cdf0e10cSrcweir#define __com_sun_star_xml_dom_XDocument_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XNode_idl__ 28cdf0e10cSrcweir#include <com/sun/star/xml/dom/XNode.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XAttr_idl__ 31cdf0e10cSrcweir#include <com/sun/star/xml/dom/XAttr.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XCDATASection_idl__ 34cdf0e10cSrcweir#include <com/sun/star/xml/dom/XCDATASection.idl> 35cdf0e10cSrcweir#endif 36cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XComment_idl__ 37cdf0e10cSrcweir#include <com/sun/star/xml/dom/XComment.idl> 38cdf0e10cSrcweir#endif 39cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XDocumentFragemnt_idl__ 40cdf0e10cSrcweir#include <com/sun/star/xml/dom/XDocumentFragment.idl> 41cdf0e10cSrcweir#endif 42cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XEntityReference_idl__ 43cdf0e10cSrcweir#include <com/sun/star/xml/dom/XEntityReference.idl> 44cdf0e10cSrcweir#endif 45cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XProcessingInstruction_idl__ 46cdf0e10cSrcweir#include <com/sun/star/xml/dom/XProcessingInstruction.idl> 47cdf0e10cSrcweir#endif 48cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XDocumentType_idl__ 49cdf0e10cSrcweir#include <com/sun/star/xml/dom/XDocumentType.idl> 50cdf0e10cSrcweir#endif 51cdf0e10cSrcweir#ifndef __com_sun_star_xml_dom_XDOMImplementation_idl__ 52cdf0e10cSrcweir#include <com/sun/star/xml/dom/XDOMImplementation.idl> 53cdf0e10cSrcweir#endif 54cdf0e10cSrcweir 55cdf0e10cSrcweirmodule com { module sun { module star { module xml { module dom { 56cdf0e10cSrcweir 57cdf0e10cSrcweirinterface XDocument: XNode 58cdf0e10cSrcweir{ 59cdf0e10cSrcweir /** 60cdf0e10cSrcweir Creates an Attr of the given name. 61cdf0e10cSrcweir Throws: 62cdf0e10cSrcweir DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. 63cdf0e10cSrcweir */ 64cdf0e10cSrcweir XAttr createAttribute([in] string name) raises (DOMException); 65cdf0e10cSrcweir 66cdf0e10cSrcweir /** 67cdf0e10cSrcweir Creates an attribute of the given qualified name and namespace URI. 68cdf0e10cSrcweir Throws: 69cdf0e10cSrcweir DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal 70cdf0e10cSrcweir character, per the XML 1.0 specification . 71cdf0e10cSrcweir NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML 72cdf0e10cSrcweir specification, if the qualifiedName has a prefix and the namespaceURI is null, if 73cdf0e10cSrcweir the qualifiedName has a prefix that is "xml" and the namespaceURI is different from 74cdf0e10cSrcweir " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is 75cdf0e10cSrcweir "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/". 76cdf0e10cSrcweir NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" 77cdf0e10cSrcweir feature, since namespaces were defined by XML. 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir XAttr createAttributeNS([in] string namespaceURI, [in] string qualifiedName) raises (DOMException); 80cdf0e10cSrcweir 81cdf0e10cSrcweir /** 82cdf0e10cSrcweir Creates a CDATASection node whose value is the specified string. 83cdf0e10cSrcweir Throws: 84cdf0e10cSrcweir DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document. 85cdf0e10cSrcweir */ 86cdf0e10cSrcweir XCDATASection createCDATASection([in] string data) raises (DOMException); 87cdf0e10cSrcweir 88cdf0e10cSrcweir /** 89cdf0e10cSrcweir Creates a Comment node given the specified string. 90cdf0e10cSrcweir */ 91cdf0e10cSrcweir XComment createComment([in] string data); 92cdf0e10cSrcweir 93cdf0e10cSrcweir /** 94cdf0e10cSrcweir Creates an empty DocumentFragment object. 95cdf0e10cSrcweir */ 96cdf0e10cSrcweir XDocumentFragment createDocumentFragment(); 97cdf0e10cSrcweir 98cdf0e10cSrcweir 99cdf0e10cSrcweir /** 100cdf0e10cSrcweir Creates an element of the type specified. 101cdf0e10cSrcweir Throws: 102cdf0e10cSrcweir DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. 103cdf0e10cSrcweir */ 104cdf0e10cSrcweir XElement createElement([in] string tagName) raises (DOMException); 105cdf0e10cSrcweir 106cdf0e10cSrcweir 107cdf0e10cSrcweir /** 108cdf0e10cSrcweir Creates an element of the given qualified name and namespace URI. 109cdf0e10cSrcweir Throws: 110cdf0e10cSrcweir DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an 111cdf0e10cSrcweir illegal character, per the XML 1.0 specification . 112cdf0e10cSrcweir NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in 113cdf0e10cSrcweir XML specification, if the qualifiedName has a prefix and the namespaceURI is 114cdf0e10cSrcweir null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI 115cdf0e10cSrcweir is different from " http://www.w3.org/XML/1998/namespace" . 116cdf0e10cSrcweir NOT_SUPPORTED_ERR: Always thrown if the current document does not support the 117cdf0e10cSrcweir "XML" feature, since namespaces were defined by XML. 118cdf0e10cSrcweir */ 119cdf0e10cSrcweir XElement createElementNS([in] string namespaceURI, [in] string qualifiedName) raises (DOMException); 120cdf0e10cSrcweir 121cdf0e10cSrcweir /** 122cdf0e10cSrcweir Throws: 123cdf0e10cSrcweir DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. 124cdf0e10cSrcweir Creates an EntityReference object. 125cdf0e10cSrcweir Throws: 126cdf0e10cSrcweir DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. 127cdf0e10cSrcweir NOT_SUPPORTED_ERR: Raised if this document is an HTML document. 128cdf0e10cSrcweir */ 129cdf0e10cSrcweir XEntityReference createEntityReference([in] string name) raises (DOMException); 130cdf0e10cSrcweir 131cdf0e10cSrcweir /** 132cdf0e10cSrcweir Creates a ProcessingInstruction node given the specified name and 133cdf0e10cSrcweir data strings. 134cdf0e10cSrcweir Throws: 135cdf0e10cSrcweir DOMException - INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character. 136cdf0e10cSrcweir NOT_SUPPORTED_ERR: Raised if this document is an HTML document. 137cdf0e10cSrcweir */ 138cdf0e10cSrcweir XProcessingInstruction createProcessingInstruction( 139cdf0e10cSrcweir [in] string target, [in] string data) raises (DOMException); 140cdf0e10cSrcweir 141cdf0e10cSrcweir /** 142cdf0e10cSrcweir Creates a Text node given the specified string. 143cdf0e10cSrcweir */ 144cdf0e10cSrcweir XText createTextNode([in] string data); 145cdf0e10cSrcweir 146cdf0e10cSrcweir /** 147cdf0e10cSrcweir The Document Type Declaration (see DocumentType) associated with this 148cdf0e10cSrcweir document. 149cdf0e10cSrcweir */ 150cdf0e10cSrcweir XDocumentType getDoctype(); 151cdf0e10cSrcweir 152cdf0e10cSrcweir /** 153cdf0e10cSrcweir This is a convenience attribute that allows direct access to the child 154cdf0e10cSrcweir node that is the root element of the document. 155cdf0e10cSrcweir */ 156cdf0e10cSrcweir XElement getDocumentElement(); 157cdf0e10cSrcweir 158cdf0e10cSrcweir /** 159cdf0e10cSrcweir Returns the Element whose ID is given by elementId. 160cdf0e10cSrcweir */ 161cdf0e10cSrcweir XElement getElementById([in] string elementId); 162cdf0e10cSrcweir 163cdf0e10cSrcweir /** 164cdf0e10cSrcweir Returns a NodeList of all the Elements with a given tag name in the 165cdf0e10cSrcweir order in which they are encountered in a preorder traversal of the 166cdf0e10cSrcweir Document tree. 167cdf0e10cSrcweir */ 168cdf0e10cSrcweir XNodeList getElementsByTagName([in] string tagname); 169cdf0e10cSrcweir 170cdf0e10cSrcweir /** 171cdf0e10cSrcweir Returns a NodeList of all the Elements with a given local name and 172cdf0e10cSrcweir namespace URI in the order in which they are encountered in a preorder 173cdf0e10cSrcweir traversal of the Document tree. 174cdf0e10cSrcweir */ 175cdf0e10cSrcweir XNodeList getElementsByTagNameNS([in] string namespaceURI, [in] string localName); 176cdf0e10cSrcweir 177cdf0e10cSrcweir /** 178cdf0e10cSrcweir The DOMImplementation object that handles this document. 179cdf0e10cSrcweir */ 180cdf0e10cSrcweir XDOMImplementation getImplementation(); 181cdf0e10cSrcweir 182cdf0e10cSrcweir /** 183cdf0e10cSrcweir Imports a node from another document to this document. 184cdf0e10cSrcweir Throws: 185cdf0e10cSrcweir DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. 186cdf0e10cSrcweir */ 187cdf0e10cSrcweir XNode importNode([in] XNode importedNode, [in] boolean deep) raises (DOMException); 188cdf0e10cSrcweir}; 189cdf0e10cSrcweir};};};};}; 190cdf0e10cSrcweir 191cdf0e10cSrcweir#endif 192