1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_xml_dom_XElement_idl__ 25*b1cdbd2cSJim Jagielski#define __com_sun_star_xml_dom_XElement_idl__ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_xml_dom_XNode_idl__ 28*b1cdbd2cSJim Jagielski#include <com/sun/star/xml/dom/XNode.idl> 29*b1cdbd2cSJim Jagielski#endif 30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_xml_dom_XAttr_idl__ 31*b1cdbd2cSJim Jagielski#include <com/sun/star/xml/dom/XAttr.idl> 32*b1cdbd2cSJim Jagielski#endif 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module xml { module dom { 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielskiinterface XElement: XNode 37*b1cdbd2cSJim Jagielski{ 38*b1cdbd2cSJim Jagielski /** 39*b1cdbd2cSJim Jagielski Retrieves an attribute value by name. 40*b1cdbd2cSJim Jagielski */ 41*b1cdbd2cSJim Jagielski string getAttribute([in] string name); 42*b1cdbd2cSJim Jagielski 43*b1cdbd2cSJim Jagielski /** 44*b1cdbd2cSJim Jagielski Retrieves an attribute node by name. 45*b1cdbd2cSJim Jagielski */ 46*b1cdbd2cSJim Jagielski XAttr getAttributeNode([in] string name); 47*b1cdbd2cSJim Jagielski 48*b1cdbd2cSJim Jagielski /** 49*b1cdbd2cSJim Jagielski Retrieves an Attr node by local name and namespace URI. 50*b1cdbd2cSJim Jagielski */ 51*b1cdbd2cSJim Jagielski XAttr getAttributeNodeNS([in] string namespaceURI,[in] 52*b1cdbd2cSJim Jagielski string localName); 53*b1cdbd2cSJim Jagielski 54*b1cdbd2cSJim Jagielski /** 55*b1cdbd2cSJim Jagielski Retrieves an attribute value by local name and namespace URI. 56*b1cdbd2cSJim Jagielski */ 57*b1cdbd2cSJim Jagielski string getAttributeNS([in] string namespaceURI, [in] string localName); 58*b1cdbd2cSJim Jagielski 59*b1cdbd2cSJim Jagielski /** 60*b1cdbd2cSJim Jagielski Returns a NodeList of all descendant Elements with a given tag name, 61*b1cdbd2cSJim Jagielski in the order in which they are 62*b1cdbd2cSJim Jagielski encountered in a preorder traversal of this Element tree. 63*b1cdbd2cSJim Jagielski */ 64*b1cdbd2cSJim Jagielski XNodeList getElementsByTagName([in] string name); 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski /** 67*b1cdbd2cSJim Jagielski Returns a NodeList of all the descendant Elements with a given local 68*b1cdbd2cSJim Jagielski name and namespace URI in the order in which they are encountered in 69*b1cdbd2cSJim Jagielski a preorder traversal of this Element tree. 70*b1cdbd2cSJim Jagielski */ 71*b1cdbd2cSJim Jagielski XNodeList getElementsByTagNameNS([in] string namespaceURI,[in] string localName); 72*b1cdbd2cSJim Jagielski 73*b1cdbd2cSJim Jagielski /** 74*b1cdbd2cSJim Jagielski The name of the element. 75*b1cdbd2cSJim Jagielski */ 76*b1cdbd2cSJim Jagielski string getTagName(); 77*b1cdbd2cSJim Jagielski 78*b1cdbd2cSJim Jagielski /** 79*b1cdbd2cSJim Jagielski Returns true when an attribute with a given name is specified on this 80*b1cdbd2cSJim Jagielski element or has a default value, false otherwise. 81*b1cdbd2cSJim Jagielski */ 82*b1cdbd2cSJim Jagielski boolean hasAttribute([in] string name); 83*b1cdbd2cSJim Jagielski 84*b1cdbd2cSJim Jagielski /** 85*b1cdbd2cSJim Jagielski Returns true when an attribute with a given local name and namespace 86*b1cdbd2cSJim Jagielski URI is specified on this element or has a default value, false otherwise. 87*b1cdbd2cSJim Jagielski */ 88*b1cdbd2cSJim Jagielski boolean hasAttributeNS([in] string namespaceURI,[in] string localName); 89*b1cdbd2cSJim Jagielski 90*b1cdbd2cSJim Jagielski /** 91*b1cdbd2cSJim Jagielski Removes an attribute by name. 92*b1cdbd2cSJim Jagielski Throws: 93*b1cdbd2cSJim Jagielski DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 94*b1cdbd2cSJim Jagielski */ 95*b1cdbd2cSJim Jagielski void removeAttribute([in] string name) raises (DOMException); 96*b1cdbd2cSJim Jagielski 97*b1cdbd2cSJim Jagielski /** 98*b1cdbd2cSJim Jagielski Removes the specified attribute node. 99*b1cdbd2cSJim Jagielski Throws: 100*b1cdbd2cSJim Jagielski DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 101*b1cdbd2cSJim Jagielski NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element. 102*b1cdbd2cSJim Jagielski */ 103*b1cdbd2cSJim Jagielski XAttr removeAttributeNode([in] XAttr oldAttr) raises (DOMException); 104*b1cdbd2cSJim Jagielski 105*b1cdbd2cSJim Jagielski /** 106*b1cdbd2cSJim Jagielski Removes an attribute by local name and namespace URI. 107*b1cdbd2cSJim Jagielski Throws: 108*b1cdbd2cSJim Jagielski DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 109*b1cdbd2cSJim Jagielski */ 110*b1cdbd2cSJim Jagielski void removeAttributeNS([in] string namespaceURI,[in] string localName) raises (DOMException); 111*b1cdbd2cSJim Jagielski 112*b1cdbd2cSJim Jagielski /** 113*b1cdbd2cSJim Jagielski Adds a new attribute. 114*b1cdbd2cSJim Jagielski Throws: 115*b1cdbd2cSJim Jagielski DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. 116*b1cdbd2cSJim Jagielski NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 117*b1cdbd2cSJim Jagielski */ 118*b1cdbd2cSJim Jagielski void setAttribute([in] string name,[in] string value) raises (DOMException); 119*b1cdbd2cSJim Jagielski 120*b1cdbd2cSJim Jagielski /** 121*b1cdbd2cSJim Jagielski Adds a new attribute node. 122*b1cdbd2cSJim Jagielski Throws: 123*b1cdbd2cSJim Jagielski DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. 124*b1cdbd2cSJim Jagielski NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 125*b1cdbd2cSJim Jagielski INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. 126*b1cdbd2cSJim Jagielski */ 127*b1cdbd2cSJim Jagielski XAttr setAttributeNode([in] XAttr newAttr) raises (DOMException); 128*b1cdbd2cSJim Jagielski 129*b1cdbd2cSJim Jagielski /** 130*b1cdbd2cSJim Jagielski Adds a new attribute. 131*b1cdbd2cSJim Jagielski Throws: 132*b1cdbd2cSJim Jagielski DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. 133*b1cdbd2cSJim Jagielski NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 134*b1cdbd2cSJim Jagielski INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. 135*b1cdbd2cSJim Jagielski NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML. 136*b1cdbd2cSJim Jagielski */ 137*b1cdbd2cSJim Jagielski XAttr setAttributeNodeNS([in] XAttr newAttr) raises (DOMException); 138*b1cdbd2cSJim Jagielski 139*b1cdbd2cSJim Jagielski /** 140*b1cdbd2cSJim Jagielski Adds a new attribute. 141*b1cdbd2cSJim Jagielski Throws: 142*b1cdbd2cSJim Jagielski DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . 143*b1cdbd2cSJim Jagielski NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 144*b1cdbd2cSJim Jagielski NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/". 145*b1cdbd2cSJim Jagielski NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML. 146*b1cdbd2cSJim Jagielski */ 147*b1cdbd2cSJim Jagielski void setAttributeNS( 148*b1cdbd2cSJim Jagielski [in] string namespaceURI, [in] string qualifiedName, [in] string value) raises (DOMException); 149*b1cdbd2cSJim Jagielski}; 150*b1cdbd2cSJim Jagielski}; }; }; }; }; 151*b1cdbd2cSJim Jagielski 152*b1cdbd2cSJim Jagielski#endif 153