Xalan-C++ API Reference  1.12.0
XercesElementBridge.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(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680)
19 #define XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
27 #if XERCES_VERSION_MAJOR >= 2
28 #include <xercesc/dom/deprecated/DOM_Element.hpp>
29 #else
30 #include <xercesc/dom/DOM_Element.hpp>
31 #endif
32 
33 
34 
36 
37 
38 
40 
41 
42 
46 
47 
48 
49 namespace XALAN_CPP_NAMESPACE {
50 
51 
52 
53 class XercesBridgeNavigator;
54 
55 
56 /**
57  * This class is deprecated.
58  *
59  * @deprecated This class is part of the deprecated Xerces DOM bridge.
60  */
62 {
63 public:
64 
65  typedef xercesc::DOM_Element DOM_ElementType;
66 
68  const DOM_ElementType& theXercesElement,
69  const XercesBridgeNavigator& theNavigator);
70 
71  virtual
73 
74 
75  /**
76  * Gets the name of this node.
77  */
78  virtual const XalanDOMString&
79  getNodeName() const;
80 
81  /**
82  * Gets the value of this node, depending on its type.
83  */
84  virtual const XalanDOMString&
85  getNodeValue() const;
86 
87  /**
88  * An enum value representing the type of the underlying object.
89  */
90  virtual NodeType
91  getNodeType() const;
92 
93  /**
94  * Gets the parent of this node.
95  *
96  * All nodes, except <code>Document</code>,
97  * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
98  * However, if a node has just been created and not yet added to the tree,
99  * or if it has been removed from the tree, a <code>null</code> DOM_Node
100  * is returned.
101  */
102  virtual XalanNode*
103  getParentNode() const;
104 
105  /**
106  * Gets a <code>NodeList</code> that contains all children of this node.
107  *
108  * If there
109  * are no children, this is a <code>NodeList</code> containing no nodes.
110  * The content of the returned <code>NodeList</code> is "live" in the sense
111  * that, for instance, changes to the children of the node object that
112  * it was created from are immediately reflected in the nodes returned by
113  * the <code>NodeList</code> accessors; it is not a static snapshot of the
114  * content of the node. This is true for every <code>NodeList</code>,
115  * including the ones returned by the <code>getElementsByTagName</code>
116  * method.
117  */
118  virtual const XalanNodeList*
119  getChildNodes() const;
120 
121  /**
122  * Gets the first child of this node.
123  *
124  * If there is no such node, this returns <code>null</code>.
125  */
126  virtual XalanNode*
127  getFirstChild() const;
128 
129  /**
130  * Gets the last child of this node.
131  *
132  * If there is no such node, this returns <code>null</code>.
133  */
134  virtual XalanNode*
135  getLastChild() const;
136 
137  /**
138  * Gets the node immediately preceding this node.
139  *
140  * If there is no such node, this returns <code>null</code>.
141  */
142  virtual XalanNode*
143  getPreviousSibling() const;
144 
145  /**
146  * Gets the node immediately following this node.
147  *
148  * If there is no such node, this returns <code>null</code>.
149  */
150  virtual XalanNode*
151  getNextSibling() const;
152 
153  /**
154  * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
155  * is an <code>Element</code>) or <code>null</code> otherwise.
156  */
157  virtual const XalanNamedNodeMap*
158  getAttributes() const;
159 
160  /**
161  * Gets the <code>DOM_Document</code> object associated with this node.
162  *
163  * This is also
164  * the <code>DOM_Document</code> object used to create new nodes. When this
165  * node is a <code>DOM_Document</code> or a <code>DOM_DocumentType</code>
166  * which is not used with any <code>DOM_Document</code> yet, this is
167  * <code>null</code>.
168  */
169  virtual XalanDocument*
170  getOwnerDocument() const;
171 
172  //@}
173  /** @name Cloning function. */
174  //@{
175 
176  /**
177  * Returns a duplicate of this node.
178  *
179  * This function serves as a generic copy constructor for nodes.
180  *
181  * The duplicate node has no parent (
182  * <code>parentNode</code> returns <code>null</code>.).
183  * <br>Cloning an <code>Element</code> copies all attributes and their
184  * values, including those generated by the XML processor to represent
185  * defaulted attributes, but this method does not copy any text it contains
186  * unless it is a deep clone, since the text is contained in a child
187  * <code>Text</code> node. Cloning any other type of node simply returns a
188  * copy of this node.
189  * @param deep If <code>true</code>, recursively clone the subtree under the
190  * specified node; if <code>false</code>, clone only the node itself (and
191  * its attributes, if it is an <code>Element</code>).
192  * @return The duplicate node.
193  */
194  virtual XercesElementBridge*
195  cloneNode(bool deep) const;
196 
197  //@}
198  /** @name Functions to modify the DOM Node. */
199  //@{
200 
201  /**
202  * Inserts the node <code>newChild</code> before the existing child node
203  * <code>refChild</code>.
204  *
205  * If <code>refChild</code> is <code>null</code>,
206  * insert <code>newChild</code> at the end of the list of children.
207  * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
208  * all of its children are inserted, in the same order, before
209  * <code>refChild</code>. If the <code>newChild</code> is already in the
210  * tree, it is first removed. Note that a <code>DOM_Node</code> that
211  * has never been assigned to refer to an actual node is == null.
212  * @param newChild The node to insert.
213  * @param refChild The reference node, i.e., the node before which the new
214  * node must be inserted.
215  * @return The node being inserted.
216  */
217  virtual XalanNode*
218  insertBefore(
219  XalanNode* newChild,
220  XalanNode* refChild);
221 
222  /**
223  * Replaces the child node <code>oldChild</code> with <code>newChild</code>
224  * in the list of children, and returns the <code>oldChild</code> node.
225  *
226  * If <CODE>newChild</CODE> is a <CODE>DOM_DocumentFragment</CODE> object,
227  * <CODE>oldChild</CODE> is replaced by all of the <CODE>DOM_DocumentFragment</CODE>
228  * children, which are inserted in the same order.
229  *
230  * If the <code>newChild</code> is already in the tree, it is first removed.
231  * @param newChild The new node to put in the child list.
232  * @param oldChild The node being replaced in the list.
233  * @return The node replaced.
234  */
235  virtual XalanNode*
236  replaceChild(
237  XalanNode* newChild,
238  XalanNode* oldChild);
239 
240  /**
241  * Removes the child node indicated by <code>oldChild</code> from the list
242  * of children, and returns it.
243  *
244  * @param oldChild The node being removed.
245  * @return The node removed.
246  */
247  virtual XalanNode*
248  removeChild(XalanNode* oldChild);
249 
250  /**
251  * Adds the node <code>newChild</code> to the end of the list of children of
252  * this node.
253  *
254  * If the <code>newChild</code> is already in the tree, it is
255  * first removed.
256  * @param newChild The node to add.If it is a <code>DocumentFragment</code>
257  * object, the entire contents of the document fragment are moved into
258  * the child list of this node
259  * @return The node added.
260  */
261  virtual XalanNode*
262  appendChild(XalanNode* newChild);
263 
264  //@}
265  /** @name Query functions. */
266  //@{
267 
268  /**
269  * This is a convenience method to allow easy determination of whether a
270  * node has any children.
271  *
272  * @return <code>true</code> if the node has any children,
273  * <code>false</code> if the node has no children.
274  */
275  virtual bool
276  hasChildNodes() const;
277 
278 
279  //@}
280  /** @name Set functions. */
281  //@{
282 
283 
284  /**
285  * Sets the value of the node.
286  *
287  * Any node which can have a nodeValue (@see getNodeValue) will
288  * also accept requests to set it to a string. The exact response to
289  * this varies from node to node -- Attribute, for example, stores
290  * its values in its children and has to replace them with a new Text
291  * holding the replacement value.
292  *
293  * For most types of Node, value is null and attempting to set it
294  * will throw DOMException(NO_MODIFICATION_ALLOWED_ERR). This will
295  * also be thrown if the node is read-only.
296  */
297  virtual void
298  setNodeValue(const XalanDOMString& nodeValue);
299 
300  //@}
301  /** @name Functions introduced in DOM Level 2. */
302  //@{
303 
304  /**
305  * Puts all <CODE>DOM_Text</CODE>
306  * nodes in the full depth of the sub-tree underneath this <CODE>DOM_Node</CODE>,
307  * including attribute nodes, into a "normal" form where only markup (e.g.,
308  * tags, comments, processing instructions, CDATA sections, and entity
309  * references) separates <CODE>DOM_Text</CODE>
310  * nodes, i.e., there are no adjacent <CODE>DOM_Text</CODE>
311  * nodes. This can be used to ensure that the DOM view of a document is the
312  * same as if it were saved and re-loaded, and is useful when operations
313  * (such as XPointer lookups) that depend on a particular document tree
314  * structure are to be used.
315  * <P><B>Note:</B> In cases where the document contains <CODE>DOM_CDATASections</CODE>,
316  * the normalize operation alone may not be sufficient, since XPointers do
317  * not differentiate between <CODE>DOM_Text</CODE>
318  * nodes and <CODE>DOM_CDATASection</CODE> nodes.</P>
319  */
320  virtual void
321  normalize();
322 
323  /**
324  * Tests whether the DOM implementation implements a specific
325  * feature and that feature is supported by this node.
326  * @param feature The string of the feature to test. This is the same
327  * name as what can be passed to the method <code>hasFeature</code> on
328  * <code>DOMImplementation</code>.
329  * @param version This is the version number of the feature to test. In
330  * Level 2, version 1, this is the string "2.0". If the version is not
331  * specified, supporting any version of the feature will cause the
332  * method to return <code>true</code>.
333  * @return Returns <code>true</code> if the specified feature is supported
334  * on this node, <code>false</code> otherwise.
335  */
336  virtual bool
337  isSupported(
338  const XalanDOMString& feature,
339  const XalanDOMString& version) const;
340 
341  /**
342  * Get the <em>namespace URI</em> of
343  * this node, or <code>null</code> if it is unspecified.
344  * <p>
345  * This is not a computed value that is the result of a namespace lookup
346  * based on an examination of the namespace declarations in scope. It is
347  * merely the namespace URI given at creation time.
348  * <p>
349  * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
350  * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
351  * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
352  * interface, this is always <CODE>null</CODE>.
353  */
354  virtual const XalanDOMString&
355  getNamespaceURI() const;
356 
357  /**
358  * Get the <em>namespace prefix</em>
359  * of this node, or <code>null</code> if it is unspecified.
360  */
361  virtual const XalanDOMString&
362  getPrefix() const;
363 
364  /**
365  * Returns the local part of the <em>qualified name</em> of this node.
366  * <p>
367  * For nodes created with a DOM Level 1 method, such as
368  * <code>createElement</code> from the <code>DOM_Document</code> interface,
369  * it is null.
370  */
371  virtual const XalanDOMString&
372  getLocalName() const;
373 
374  /**
375  * Set the <em>namespace prefix</em> of this node.
376  * <p>
377  * Note that setting this attribute, when permitted, changes
378  * the <CODE>nodeName</CODE> attribute, which holds the <EM>qualified
379  * name</EM>, as well as the <CODE>tagName</CODE> and <CODE>name</CODE>
380  * attributes of the <CODE>DOM_Element</CODE> and <CODE>DOM_Attr</CODE>
381  * interfaces, when applicable.
382  * <p>
383  * Note also that changing the prefix of an
384  * attribute, that is known to have a default value, does not make a new
385  * attribute with the default value and the original prefix appear, since the
386  * <CODE>namespaceURI</CODE> and <CODE>localName</CODE> do not change.
387  *
388  * @param prefix The prefix of this node.
389  * @exception DOMException
390  * INVALID_CHARACTER_ERR: Raised if the specified prefix contains
391  * an illegal character.
392  * <br>
393  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
394  * <br>
395  * NAMESPACE_ERR: Raised if the specified <CODE>prefix</CODE> is
396  * malformed, if the specified prefix is "xml" and the
397  * <CODE>namespaceURI</CODE> of this node is different from
398  * "http://www.w3.org/XML/1998/namespace", if specified prefix is
399  * "xmlns" and the <CODE>namespaceURI</CODE> is neither
400  * <CODE>null</CODE> nor an empty string, or if the
401  * <CODE>localName</CODE> is <CODE>null</CODE>.
402  */
403  virtual void
404  setPrefix(const XalanDOMString& prefix);
405 
406  virtual bool
407  isIndexed() const;
408 
409  virtual IndexType
410  getIndex() const;
411 
412  //@}
413 
414  // These interfaces are inherited from XalanElement...
415 
416  /**
417  * The name of the element.
418  *
419  * For example, in: &lt;elementExample
420  * id="demo"&gt; ... &lt;/elementExample&gt; , <code>tagName</code> has
421  * the value <code>"elementExample"</code>. Note that this is
422  * case-preserving in XML, as are all of the operations of the DOM.
423  */
424  virtual const XalanDOMString&
425  getTagName() const;
426 
427  /**
428  * Retrieves an attribute value by name.
429  *
430  * @param name The name of the attribute to retrieve.
431  * @return The <code>DOM_Attr</code> value as a string, or the empty string if
432  * that attribute does not have a specified or default value.
433  */
434  virtual const XalanDOMString&
435  getAttribute(const XalanDOMString& name) const;
436 
437  /**
438  * Retrieves an <code>DOM_Attr</code> node by name.
439  *
440  * @param name The name (<CODE>nodeName</CODE>) of the attribute to retrieve.
441  * @return The <code>DOM_Attr</code> node with the specified name (<CODE>nodeName</CODE>) or
442  * <code>null</code> if there is no such attribute.
443  */
444  virtual XalanAttr*
445  getAttributeNode(const XalanDOMString& name) const;
446 
447  /**
448  * Returns a <code>NodeList</code> of all descendant elements with a given
449  * tag name, in the order in which they would be encountered in a preorder
450  * traversal of the <code>DOM_Element</code> tree. Caller is
451  * responsible for deleting the XalanNodeList instance.
452  *
453  * @param name The name of the tag to match on. The special value "*"
454  * matches all tags.
455  * @return A list of matching <code>DOM_Element</code> nodes.
456  */
457  virtual XalanNodeList*
458  getElementsByTagName(const XalanDOMString& name) const;
459 
460  //@}
461  /** @name Set functions. */
462  //@{
463 
464  /**
465  * Adds a new attribute.
466  *
467  * If an attribute with that name is already present
468  * in the element, its value is changed to be that of the value parameter.
469  * This value is a simple string, it is not parsed as it is being set. So
470  * any markup (such as syntax to be recognized as an entity reference) is
471  * treated as literal text, and needs to be appropriately escaped by the
472  * implementation when it is written out. In order to assign an attribute
473  * value that contains entity references, the user must create an
474  * <code>DOM_Attr</code> node plus any <code>Text</code> and
475  * <code>EntityReference</code> nodes, build the appropriate subtree, and
476  * use <code>setAttributeNode</code> to assign it as the value of an
477  * attribute.
478  * @param name The name of the attribute to create or alter.
479  * @param value Value to set in string form.
480  * @exception DOMException
481  * INVALID_CHARACTER_ERR: Raised if the specified name contains an
482  * illegal character.
483  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
484  */
485  virtual void
486  setAttribute(
487  const XalanDOMString& name,
488  const XalanDOMString& value);
489 
490  /**
491  * Adds a new attribute.
492  *
493  * If an attribute with that name (<CODE>nodeName</CODE>) is already present
494  * in the element, it is replaced by the new one.
495  * @param newAttr The <code>DOM_Attr</code> node to add to the attribute list.
496  * @return If the <code>newAttr</code> attribute replaces an existing
497  * attribute, the replaced
498  * <code>DOM_Attr</code> node is returned, otherwise <code>null</code> is
499  * returned.
500  * @exception DOMException
501  * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
502  * different document than the one that created the element.
503  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
504  * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
505  * attribute of another <code>DOM_Element</code> object. The DOM user must
506  * explicitly clone <code>DOM_Attr</code> nodes to re-use them in other
507  * elements.
508  */
509  virtual XalanAttr*
510  setAttributeNode(XalanAttr* newAttr);
511 
512  //@}
513  /** @name Functions which modify the Element. */
514  //@{
515 
516  /**
517  * Removes the specified attribute node.
518  * If the removed <CODE>DOM_Attr</CODE>
519  * has a default value it is immediately replaced. The replacing attribute
520  * has the same namespace URI and local name, as well as the original prefix,
521  * when applicable.
522  *
523  * @param oldAttr The <code>DOM_Attr</code> node to remove from the attribute
524  * list.
525  * @return The <code>DOM_Attr</code> node that was removed.
526  * @exception DOMException
527  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
528  * <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute
529  * of the element.
530  */
531  virtual XalanAttr*
532  removeAttributeNode(XalanAttr* oldAttr);
533 
534  /**
535  * Removes an attribute by name.
536  *
537  * If the removed attribute
538  * is known to have a default value, an attribute immediately appears
539  * containing the default value as well as the corresponding namespace URI,
540  * local name, and prefix when applicable.<BR>To remove an attribute by local
541  * name and namespace URI, use the <CODE>removeAttributeNS</CODE> method.
542  * @param name The name of the attribute to remove.
543  * @exception DOMException
544  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
545  */
546  virtual void
547  removeAttribute(const XalanDOMString& name);
548 
549  //@}
550  /** @name Functions introduced in DOM Level 2. */
551  //@{
552 
553  /**
554  * Retrieves an attribute value by local name and namespace URI.
555  *
556  * @param namespaceURI The <em>namespace URI</em> of
557  * the attribute to retrieve.
558  * @param localName The <em>local name</em> of the
559  * attribute to retrieve.
560  * @return The <code>DOM_Attr</code> value as a string, or an empty string if
561  * that attribute does not have a specified or default value.
562  */
563  virtual const XalanDOMString&
564  getAttributeNS(
565  const XalanDOMString& namespaceURI,
566  const XalanDOMString& localName) const;
567 
568  /**
569  * Adds a new attribute. If the given
570  * <CODE>namespaceURI</CODE> is <CODE>null</CODE> or an empty string and the
571  * <CODE>qualifiedName</CODE> has a prefix that is "xml", the new attribute
572  * is bound to the predefined namespace
573  * "http://www.w3.org/XML/1998/namespace".
574  * If an attribute with the same local name and namespace URI is already
575  * present on the element, its prefix is changed to be the prefix part of the
576  * <CODE>qualifiedName</CODE>, and its value is changed to be the
577  * <CODE>value</CODE> parameter.
578  * This value is a simple string, it is
579  * not parsed as it is being set. So any markup (such as syntax to be
580  * recognized as an entity reference) is treated as literal text, and
581  * needs to be appropriately escaped by the implementation when it is
582  * written out. In order to assign an attribute value that contains entity
583  * references, the user must create a <code>DOM_Attr</code> node plus any
584  * <code>DOM_Text</code> and <code>DOM_EntityReference</code> nodes, build the
585  * appropriate subtree, and use <code>setAttributeNodeNS</code> or
586  * <code>setAttributeNode</code> to assign it as the value of an
587  * attribute.
588  * @param namespaceURI The <em>namespace URI</em> of
589  * the attribute to create or alter.
590  * @param localName The <em>local name</em> of the
591  * attribute to create or alter.
592  * @param value The value to set in string form.
593  * @exception DOMException
594  * INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an
595  * illegal character.
596  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
597  * <br>
598  * NAMESPACE_ERR: Raised if the <CODE>qualifiedName</CODE> is
599  * malformed, if the <CODE>qualifiedName</CODE> has a prefix that is
600  * "xml" and the <CODE>namespaceURI</CODE> is neither <CODE>null</CODE>
601  * nor an empty string nor "http://www.w3.org/XML/1998/namespace", or
602  * if the <CODE>qualifiedName</CODE> has a prefix that is "xmlns" but
603  * the <CODE>namespaceURI</CODE> is neither <CODE>null</CODE> nor an
604  * empty string, or if if the <CODE>qualifiedName</CODE> has a prefix
605  * different from "xml" and "xmlns" and the <CODE>namespaceURI</CODE>
606  * is <CODE>null</CODE> or an empty string.
607  */
608  virtual void
609  setAttributeNS(
610  const XalanDOMString& namespaceURI,
611  const XalanDOMString& qualifiedName,
612  const XalanDOMString& value);
613 
614  /**
615  * Removes an attribute by local name and namespace URI. If the
616  * removed attribute has a default value it is immediately replaced.
617  * The replacing attribute has the same namespace URI and local name, as well as
618  * the original prefix.<BR>HTML-only DOM implementations do not need to
619  * implement this method.
620  *
621  * @param namespaceURI The <em>namespace URI</em> of
622  * the attribute to remove.
623  * @param localName The <em>local name</em> of the
624  * attribute to remove.
625  * @exception DOMException
626  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
627  */
628  virtual void
629  removeAttributeNS(
630  const XalanDOMString& namespaceURI,
631  const XalanDOMString& localName);
632 
633  /**
634  * Retrieves an <code>DOM_Attr</code> node by local name and namespace URI.
635  *
636  * @param namespaceURI The <em>namespace URI</em> of
637  * the attribute to retrieve.
638  * @param localName The <em>local name</em> of the
639  * attribute to retrieve.
640  * @return The <code>DOM_Attr</code> node with the specified attribute local
641  * name and namespace URI or <code>null</code> if there is no such attribute.
642  */
643  virtual XalanAttr*
644  getAttributeNodeNS(
645  const XalanDOMString& namespaceURI,
646  const XalanDOMString& localName) const;
647 
648  /**
649  * Adds a new attribute.
650  *
651  * If an attribute with that local name and namespace URI is already present
652  * in the element, it is replaced by the new one.
653  * @param newAttr The <code>DOM_Attr</code> node to add to the attribute list.
654  * @return If the <code>newAttr</code> attribute replaces an existing
655  * attribute with the same <em>local name</em> and <em>namespace URI</em>,
656  * the replaced <code>DOM_Attr</code> node is
657  * returned, otherwise <code>null</code> is returned.
658  * @exception DOMException
659  * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
660  * different document than the one that created the element.
661  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
662  * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
663  * attribute of another <code>DOM_Element</code> object. The DOM user must
664  * explicitly clone <code>DOM_Attr</code> nodes to re-use them in other
665  * elements.
666  */
667  virtual XalanAttr*
668  setAttributeNodeNS(XalanAttr* newAttr);
669 
670  /**
671  * Returns a <code>DOM_NodeList</code> of all the <code>DOM_Element</code>s
672  * with a given local name and namespace URI in the order in which they
673  * would be encountered in a preorder traversal of the
674  * <code>DOM_Document</code> tree, starting from this node. Caller is
675  * responsible for deleting the XalanNodeList instance.
676  *
677  * @param namespaceURI The <em>namespace URI</em> of
678  * the elements to match on. The special value "*" matches all
679  * namespaces.
680  * @param localName The <em>local name</em> of the
681  * elements to match on. The special value "*" matches all local names.
682  * @return A new <code>DOM_NodeList</code> object containing all the matched
683  * <code>Element</code>s.
684  */
685  virtual XalanNodeList*
686  getElementsByTagNameNS(
687  const XalanDOMString& namespaceURI,
688  const XalanDOMString& localName) const;
689 
690  /**
691  * Get the Xerces node this instance represent.
692  *
693  * @return The Xerces node
694  */
697  {
698  return m_xercesNode;
699  }
700 
701  //@}
702 
703 private:
704 
705  // Not implemented...
706  XercesElementBridge(const XercesElementBridge& theSource);
707 
708  XalanNode&
709  operator=(const XalanNode& theSource);
710 
711  bool
712  operator==(const XercesElementBridge& theRHS) const;
713 
714  // Data members...
715  XercesDOM_ElementHack m_xercesNode;
716 
717  const XercesBridgeNavigator& m_navigator;
718 
719  XercesNodeListBridge m_children;
720 
721  XercesNamedNodeMapBridge m_attributes;
722 };
723 
724 
725 
726 }
727 
728 
729 
730 #endif // !defined(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680)
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
XalanElement.hpp
xalanc::XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:47
xalanc::XercesNodeListBridge
This class is deprecated.
Definition: XercesNodeListBridge.hpp:55
xalanc::XalanDocument
Definition: XalanDocument.hpp:36
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XercesNamedNodeMapBridge
This class is deprecated.
Definition: XercesNamedNodeMapBridge.hpp:52
xalanc::XercesDOM_ElementHack
Definition: XercesDOM_NodeHack.hpp:97
DOMStringHelper.hpp
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
xalanc::XercesElementBridge
This class is deprecated.
Definition: XercesElementBridge.hpp:61
xalanc::XercesElementBridge::getXercesNode
DOM_ElementType getXercesNode() const
Get the Xerces node this instance represent.
Definition: XercesElementBridge.hpp:696
xalanc::XalanAttr
Definition: XalanAttr.hpp:40
XercesParserLiaisonDefinitions.hpp
xalanc::XalanNodeList
Definition: XalanNodeList.hpp:36
xalanc::XercesElementBridge::DOM_ElementType
xercesc::DOM_Element DOM_ElementType
Definition: XercesElementBridge.hpp:65
XALAN_XERCESPARSERLIAISON_EXPORT
#define XALAN_XERCESPARSERLIAISON_EXPORT
Definition: XercesParserLiaisonDefinitions.hpp:39
XercesNamedNodeMapBridge.hpp
XercesDOM_NodeHack.hpp
xalanc::XalanElement
Definition: XalanElement.hpp:44
xalanc::XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:36
xalanc::XercesBridgeNavigator
This class is deprecated.
Definition: XercesBridgeNavigator.hpp:55
XercesNodeListBridge.hpp
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45