[2674] | 1 | /* |
---|
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 3 | * contributor license agreements. See the NOTICE file distributed with |
---|
| 4 | * this work for additional information regarding copyright ownership. |
---|
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 6 | * (the "License"); you may not use this file except in compliance with |
---|
| 7 | * the License. You may obtain a copy of the License at |
---|
| 8 | * |
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 10 | * |
---|
| 11 | * Unless required by applicable law or agreed to in writing, software |
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 14 | * See the License for the specific language governing permissions and |
---|
| 15 | * limitations under the License. |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | /* |
---|
| 19 | * $Id: XUtil.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
| 20 | */ |
---|
| 21 | |
---|
| 22 | #if !defined(XUTIL_HPP) |
---|
| 23 | #define XUTIL_HPP |
---|
| 24 | |
---|
| 25 | #include <xercesc/dom/DOMElement.hpp> |
---|
| 26 | #include <xercesc/dom/DOMDocument.hpp> |
---|
| 27 | #include <xercesc/dom/DOMNamedNodeMap.hpp> |
---|
| 28 | #include <xercesc/dom/DOMNode.hpp> |
---|
| 29 | |
---|
| 30 | XERCES_CPP_NAMESPACE_BEGIN |
---|
| 31 | |
---|
| 32 | class DOMNode; |
---|
| 33 | class DOMElement; |
---|
| 34 | |
---|
| 35 | /** |
---|
| 36 | * Some useful utility methods. |
---|
| 37 | */ |
---|
| 38 | class VALIDATORS_EXPORT XUtil |
---|
| 39 | { |
---|
| 40 | public: |
---|
| 41 | |
---|
| 42 | // Finds and returns the first child element node. |
---|
| 43 | static DOMElement* getFirstChildElement(const DOMNode* const parent); |
---|
| 44 | |
---|
| 45 | // Finds and returns the first child node with the given qualifiedname. |
---|
| 46 | static DOMElement* getFirstChildElementNS(const DOMNode* const parent |
---|
| 47 | , const XMLCh** const elemNames |
---|
| 48 | , const XMLCh* const uriStr |
---|
| 49 | , unsigned int length); |
---|
| 50 | |
---|
| 51 | // Finds and returns the next sibling element node. |
---|
| 52 | static DOMElement* getNextSiblingElement(const DOMNode* const node); |
---|
| 53 | |
---|
| 54 | static DOMElement* getNextSiblingElementNS(const DOMNode* const node |
---|
| 55 | , const XMLCh** const elemNames |
---|
| 56 | , const XMLCh* const uriStr |
---|
| 57 | , unsigned int length); |
---|
| 58 | |
---|
| 59 | private: |
---|
| 60 | // ----------------------------------------------------------------------- |
---|
| 61 | // Constructors and Destructor |
---|
| 62 | // ----------------------------------------------------------------------- |
---|
| 63 | |
---|
| 64 | // This class cannot be instantiated. |
---|
| 65 | XUtil() {}; |
---|
| 66 | ~XUtil() {}; |
---|
| 67 | }; |
---|
| 68 | |
---|
| 69 | XERCES_CPP_NAMESPACE_END |
---|
| 70 | |
---|
| 71 | #endif |
---|