1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_xml_dom_XCharacterData_idl__
25#define __com_sun_star_xml_dom_XCharacterData_idl__
26
27#ifndef __com_sun_star_xml_dom_XNode_idl__
28#include <com/sun/star/xml/dom/XNode.idl>
29#endif
30
31module com { module sun { module star { module xml { module dom {
32
33interface XCharacterData: XNode
34{
35    /**
36    Append the string to the end of the character data of the node.
37    Throws:
38        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
39    */
40    void appendData([in] string arg) raises (DOMException);
41
42    /**
43    Remove a range of 16-bit units from the node.
44    Throws:
45        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
46            than the number of 16-bit units in data, or if the specified count is negative.
47        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
48    */
49    void deleteData([in] long offset, [in] long count) raises (DOMException);
50
51    /**
52    Return the character data of the node that implements this interface.
53    Throws:
54        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
55        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters
56            than fit in a DOMString variable on the implementation platform.
57
58
59    */
60    string getData() raises (DOMException);
61
62    /**
63    The number of 16-bit units that are available through data and the
64    substringData method below.
65    */
66    long getLength();
67
68    /**
69    Insert a string at the specified 16-bit unit offset.
70    Throws:
71    DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than
72                                   the number of 16-bit units in data.
73                   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
74    */
75    void insertData([in] long offset, [in] string arg) raises (DOMException);
76
77    /**
78    Replace the characters starting at the specified 16-bit unit offset
79    with the specified string.
80    Throws;
81    DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than
82                      the number of 16-bit units in data, or if the specified count is negative.
83                   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
84    */
85    void replaceData([in] long offset, [in] long count, [in] string arg) raises (DOMException);
86
87    /**
88    Set the character data of the node that implements this interface.
89    Throws:
90        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
91        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
92            fit in a DOMString variable on the implementation platform.
93    */
94    void setData([in] string data) raises (DOMException);
95
96    /**
97    Extracts a range of data from the node.
98    Throws:
99        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
100            than the number of 16-bit units in data, or if the specified count is negative.
101        DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a DOMString.
102    */
103    string subStringData([in] long offset, [in] long count) raises (DOMException);
104
105};
106};};};};};
107
108#endif
109