1 | /*
|
---|
2 | * Copyright 2001,2004 The Apache Software Foundation.
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | */
|
---|
16 |
|
---|
17 | /*
|
---|
18 | * $Log: XUtil.hpp,v $
|
---|
19 | * Revision 1.6 2004/09/08 13:56:58 peiyongz
|
---|
20 | * Apache License Version 2.0
|
---|
21 | *
|
---|
22 | * Revision 1.5 2004/01/29 11:52:31 cargilld
|
---|
23 | * Code cleanup changes to get rid of various compiler diagnostic messages.
|
---|
24 | *
|
---|
25 | * Revision 1.4 2002/11/04 14:49:42 tng
|
---|
26 | * C++ Namespace Support.
|
---|
27 | *
|
---|
28 | * Revision 1.3 2002/05/21 19:31:45 tng
|
---|
29 | * DOM Reorganization: modify to use the new DOM interface and remove obsolete code in XUtil.
|
---|
30 | *
|
---|
31 | * Revision 1.2 2002/02/06 22:21:49 knoaman
|
---|
32 | * Use IDOM for schema processing.
|
---|
33 | *
|
---|
34 | * Revision 1.1.1.1 2002/02/01 22:22:50 peiyongz
|
---|
35 | * sane_include
|
---|
36 | *
|
---|
37 | * Revision 1.3 2001/11/02 14:13:45 knoaman
|
---|
38 | * Add support for identity constraints.
|
---|
39 | *
|
---|
40 | * Revision 1.2 2001/05/11 13:27:39 tng
|
---|
41 | * Copyright update.
|
---|
42 | *
|
---|
43 | * Revision 1.1 2001/03/30 16:06:00 tng
|
---|
44 | * Schema: XUtil, added by Pei Yong Zhang
|
---|
45 | *
|
---|
46 | */
|
---|
47 |
|
---|
48 | #if !defined(XUTIL_HPP)
|
---|
49 | #define XUTIL_HPP
|
---|
50 |
|
---|
51 | #include <xercesc/dom/DOMElement.hpp>
|
---|
52 | #include <xercesc/dom/DOMDocument.hpp>
|
---|
53 | #include <xercesc/dom/DOMNamedNodeMap.hpp>
|
---|
54 | #include <xercesc/dom/DOMNode.hpp>
|
---|
55 |
|
---|
56 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
57 |
|
---|
58 | class DOMNode;
|
---|
59 | class DOMElement;
|
---|
60 |
|
---|
61 | /**
|
---|
62 | * Some useful utility methods.
|
---|
63 | */
|
---|
64 | class VALIDATORS_EXPORT XUtil
|
---|
65 | {
|
---|
66 | public:
|
---|
67 |
|
---|
68 | // Finds and returns the first child element node.
|
---|
69 | static DOMElement* getFirstChildElement(const DOMNode* const parent);
|
---|
70 |
|
---|
71 | // Finds and returns the first child node with the given qualifiedname.
|
---|
72 | static DOMElement* getFirstChildElementNS(const DOMNode* const parent
|
---|
73 | , const XMLCh** const elemNames
|
---|
74 | , const XMLCh* const uriStr
|
---|
75 | , unsigned int length);
|
---|
76 |
|
---|
77 | // Finds and returns the next sibling element node.
|
---|
78 | static DOMElement* getNextSiblingElement(const DOMNode* const node);
|
---|
79 |
|
---|
80 | static DOMElement* getNextSiblingElementNS(const DOMNode* const node
|
---|
81 | , const XMLCh** const elemNames
|
---|
82 | , const XMLCh* const uriStr
|
---|
83 | , unsigned int length);
|
---|
84 |
|
---|
85 | private:
|
---|
86 | // -----------------------------------------------------------------------
|
---|
87 | // Constructors and Destructor
|
---|
88 | // -----------------------------------------------------------------------
|
---|
89 |
|
---|
90 | // This class cannot be instantiated.
|
---|
91 | XUtil() {};
|
---|
92 | ~XUtil() {};
|
---|
93 | };
|
---|
94 |
|
---|
95 | XERCES_CPP_NAMESPACE_END
|
---|
96 |
|
---|
97 | #endif
|
---|