Get the style color and number just once
[LibreOffice.git] / offapi / com / sun / star / xml / dom / XDocument.idl
blob6ffb107847bb659f12f40a17c6da2a702f55f95f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com { module sun { module star { module xml { module dom {
22 interface XDocument: XNode
24 /**
25 Creates an Attr of the given name.
26 Throws:
27 DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
29 XAttr createAttribute([in] string name) raises (DOMException);
31 /**
32 Creates an attribute of the given qualified name and namespace URI.
33 Throws:
34 DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal
35 character, per the XML 1.0 specification .
36 NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML
37 specification, if the qualifiedName has a prefix and the namespaceURI is null, if
38 the qualifiedName has a prefix that is "xml" and the namespaceURI is different from
39 " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is
40 "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/".
41 NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML"
42 feature, since namespaces were defined by XML.
44 XAttr createAttributeNS([in] string namespaceURI, [in] string qualifiedName) raises (DOMException);
46 /**
47 Creates a CDATASection node whose value is the specified string.
48 Throws:
49 DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
51 XCDATASection createCDATASection([in] string data) raises (DOMException);
53 /**
54 Creates a Comment node given the specified string.
56 XComment createComment([in] string data);
58 /**
59 Creates an empty DocumentFragment object.
61 XDocumentFragment createDocumentFragment();
64 /**
65 Creates an element of the type specified.
66 Throws:
67 DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
69 XElement createElement([in] string tagName) raises (DOMException);
72 /**
73 Creates an element of the given qualified name and namespace URI.
74 Throws:
75 DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an
76 illegal character, per the XML 1.0 specification .
77 NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in
78 XML specification, if the qualifiedName has a prefix and the namespaceURI is
79 null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI
80 is different from " http://www.w3.org/XML/1998/namespace" .
81 NOT_SUPPORTED_ERR: Always thrown if the current document does not support the
82 "XML" feature, since namespaces were defined by XML.
84 XElement createElementNS([in] string namespaceURI, [in] string qualifiedName) raises (DOMException);
86 /**
87 Throws:
88 DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
89 Creates an EntityReference object.
90 Throws:
91 DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
92 NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
94 XEntityReference createEntityReference([in] string name) raises (DOMException);
96 /**
97 Creates a ProcessingInstruction node given the specified name and
98 data strings.
99 Throws:
100 DOMException - INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character.
101 NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
103 XProcessingInstruction createProcessingInstruction(
104 [in] string target, [in] string data) raises (DOMException);
107 Creates a Text node given the specified string.
109 XText createTextNode([in] string data);
112 The Document Type Declaration (see DocumentType) associated with this
113 document.
115 XDocumentType getDoctype();
118 This is a convenience attribute that allows direct access to the child
119 node that is the root element of the document.
121 XElement getDocumentElement();
124 Returns the Element whose ID is given by elementId.
126 XElement getElementById([in] string elementId);
129 Returns a NodeList of all the Elements with a given tag name in the
130 order in which they are encountered in a preorder traversal of the
131 Document tree.
133 XNodeList getElementsByTagName([in] string tagname);
136 Returns a NodeList of all the Elements with a given local name and
137 namespace URI in the order in which they are encountered in a preorder
138 traversal of the Document tree.
140 XNodeList getElementsByTagNameNS([in] string namespaceURI, [in] string localName);
143 The DOMImplementation object that handles this document.
145 XDOMImplementation getImplementation();
148 Imports a node from another document to this document.
149 Throws:
150 DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
152 XNode importNode([in] XNode importedNode, [in] boolean deep) raises (DOMException);
154 };};};};};
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */