Xalan-C++ API Reference 1.12.0
XalanProcessingInstruction.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALANPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680)
19#define XALANPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680
20
21
22
25
26
27
28namespace XALAN_CPP_NAMESPACE {
29
30
31
33{
34public:
35
37
38 virtual
40
41
42 // These interfaces are inherited from XalanNode...
43 virtual const XalanDOMString&
44 getNodeName() const = 0;
45
46 /**
47 * Gets the value of this node, depending on its type.
48 */
49 virtual const XalanDOMString&
50 getNodeValue() const = 0;
51
52 /**
53 * An enum value representing the type of the underlying object.
54 */
55 virtual NodeType
56 getNodeType() const = 0;
57
58 /**
59 * Gets the parent of this node.
60 *
61 * All nodes, except <code>Document</code>,
62 * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
63 * However, if a node has just been created and not yet added to the tree,
64 * or if it has been removed from the tree, a <code>null</code> Node
65 * is returned.
66 */
67 virtual XalanNode*
68 getParentNode() const = 0;
69
70 /**
71 * Gets a <code>NodeList</code> that contains all children of this node.
72 *
73 * If there
74 * are no children, this is a <code>NodeList</code> containing no nodes.
75 * The content of the returned <code>NodeList</code> is "live" in the sense
76 * that, for instance, changes to the children of the node object that
77 * it was created from are immediately reflected in the nodes returned by
78 * the <code>NodeList</code> accessors; it is not a static snapshot of the
79 * content of the node. This is true for every <code>NodeList</code>,
80 * including the ones returned by the <code>getElementsByTagName</code>
81 * method.
82 */
83 virtual const XalanNodeList*
84 getChildNodes() const = 0;
85
86 /**
87 * Gets the first child of this node.
88 *
89 * If there is no such node, this returns <code>null</code>.
90 */
91 virtual XalanNode*
92 getFirstChild() const = 0;
93
94 /**
95 * Gets the last child of this node.
96 *
97 * If there is no such node, this returns <code>null</code>.
98 */
99 virtual XalanNode*
100 getLastChild() const = 0;
101
102 /**
103 * Gets the node immediately preceding this node.
104 *
105 * If there is no such node, this returns <code>null</code>.
106 */
107 virtual XalanNode*
109
110 /**
111 * Gets the node immediately following this node.
112 *
113 * If there is no such node, this returns <code>null</code>.
114 */
115 virtual XalanNode*
116 getNextSibling() const = 0;
117
118 /**
119 * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
120 * is an <code>Element</code>) or <code>null</code> otherwise.
121 */
122 virtual const XalanNamedNodeMap*
123 getAttributes() const = 0;
124
125 /**
126 * Gets the <code>Document</code> object associated with this node.
127 *
128 * This is also
129 * the <code>Document</code> object used to create new nodes. When this
130 * node is a <code>Document</code> or a <code>DocumentType</code>
131 * which is not used with any <code>Document</code> yet, this is
132 * <code>null</code>.
133 */
134 virtual XalanDocument*
135 getOwnerDocument() const = 0;
136
137 /**
138 * Get the <em>namespace URI</em> of
139 * this node, or <code>null</code> if it is unspecified.
140 * <p>
141 * This is not a computed value that is the result of a namespace lookup
142 * based on an examination of the namespace declarations in scope. It is
143 * merely the namespace URI given at creation time.
144 * <p>
145 * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
146 * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
147 * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
148 * interface, this is always <CODE>null</CODE>.
149 */
150 virtual const XalanDOMString&
151 getNamespaceURI() const = 0;
152
153 /**
154 * Get the <em>namespace prefix</em>
155 * of this node, or <code>null</code> if it is unspecified.
156 */
157 virtual const XalanDOMString&
158 getPrefix() const = 0;
159
160 /**
161 * Returns the local part of the <em>qualified name</em> of this node.
162 * <p>
163 * For nodes created with a DOM Level 1 method, such as
164 * <code>createElement</code> from the <code>Document</code> interface,
165 * it is null.
166 */
167 virtual const XalanDOMString&
168 getLocalName() const = 0;
169
170 /**
171 * Determine if the document is node-order indexed.
172 *
173 * @return true if the document is indexed, otherwise false.
174 */
175 virtual bool
176 isIndexed() const = 0;
177
178 /**
179 * Get the node's index. Valid only if the owner document
180 * reports that the document is node-order indexed.
181 *
182 * @return The index value, or 0 if the node is not indexed.
183 */
184 virtual IndexType
185 getIndex() const = 0;
186
187 // These interfaces are new to XalanProcessingInstruction...
188
189 /**
190 * The target of this processing instruction.
191 *
192 * XML defines this as being the
193 * first token following the markup that begins the processing instruction.
194 */
195 virtual const XalanDOMString&
196 getTarget() const = 0;
197
198 /**
199 * The content of this processing instruction.
200 *
201 * This is from the first non
202 * white space character after the target to the character immediately
203 * preceding the <code>?&gt;</code>.
204 * @exception DOMException
205 * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
206 */
207 virtual const XalanDOMString&
208 getData() const = 0;
209
210protected:
211
213
216
217 bool
219
220private:
221};
222
223
224
225}
226
227
228
229#endif // !defined(XALANPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680)
#define XALAN_DOM_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual const XalanDOMString & getData() const =0
The content of this processing instruction.
XalanProcessingInstruction & operator=(const XalanProcessingInstruction &theSource)
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
bool operator==(const XalanProcessingInstruction &theRHS) const
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children of this node.
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
virtual const XalanDOMString & getTarget() const =0
The target of this processing instruction.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual IndexType getIndex() const =0
Get the node's index.
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
XalanProcessingInstruction(const XalanProcessingInstruction &theSource)
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.