Apache Log4cxx  Version 2.0.0
Loading...
Searching...
No Matches
xml.h
Go to the documentation of this file.
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#ifndef _LOG4CXX_HELPERS_XML_H
19#define _LOG4CXX_HELPERS_XML_H
20
21#include <log4cxx/logstring.h>
24
25namespace LOG4CXX_NS
26{
27class File;
28namespace helpers
29{
30class XMLDOMNode;
31typedef std::shared_ptr<XMLDOMNode> XMLDOMNodePtr;
32
33class XMLDOMDocument;
34typedef std::shared_ptr<XMLDOMDocument> XMLDOMDocumentPtr;
35
36class XMLDOMNodeList;
37typedef std::shared_ptr<XMLDOMNodeList> XMLDOMNodeListPtr;
38
39class LOG4CXX_EXPORT DOMException : public RuntimeException
40{
41 public:
42 DOMException() : RuntimeException(LOG4CXX_STR("DOM exception")) {}
43};
44
45
67
68
72class LOG4CXX_EXPORT XMLDOMElement
73 : public XMLDOMNode
74{
75 public:
77 virtual LogString getTagName() = 0;
78 virtual LogString getAttribute(const LogString& name) = 0;
79};
81
88class LOG4CXX_EXPORT XMLDOMDocument
89 : public XMLDOMNode
90{
91 public:
93 virtual void load(const File& fileName) = 0;
94 virtual XMLDOMElementPtr getDocumentElement() = 0;
95 virtual XMLDOMElementPtr getElementById(const LogString& tagName,
96 const LogString& elementId) = 0;
97};
99
110class LOG4CXX_EXPORT XMLDOMNodeList
111 : public Object
112{
113 public:
115 virtual int getLength() = 0;
116 virtual XMLDOMNodePtr item(int index) = 0;
117};
119} // namespace helpers
120} // namespace log4cxx
121
122#endif // _LOG4CXX_HELPERS_XML_H
123
An abstract representation of file and directory path names.
Definition file.h:41
DOMException()
Definition xml.h:42
base class for java-like objects.
Definition object.h:102
RuntimeException(log4cxx_status_t stat)
The XMLDOMDocument interface represents an entire XML document.
Definition xml.h:90
virtual XMLDOMElementPtr getDocumentElement()=0
virtual void load(const File &fileName)=0
virtual XMLDOMElementPtr getElementById(const LogString &tagName, const LogString &elementId)=0
The XMLDOMElement interface represents an element in an XML document.
Definition xml.h:74
virtual LogString getAttribute(const LogString &name)=0
virtual LogString getTagName()=0
The XMLDOMNodeList interface provides the abstraction of an ordered collection of nodes,...
Definition xml.h:112
virtual XMLDOMNodePtr item(int index)=0
The XMLDOMNode interface is the primary datatype for the entire Document Object Model.
Definition xml.h:52
virtual XMLDOMNodeType getNodeType()=0
XMLDOMNodeType
Definition xml.h:56
@ NOT_IMPLEMENTED_NODE
Definition xml.h:57
@ DOCUMENT_NODE
Definition xml.h:59
@ ELEMENT_NODE
Definition xml.h:58
virtual XMLDOMNodeListPtr getChildNodes()=0
virtual XMLDOMDocumentPtr getOwnerDocument()=0
std::shared_ptr< XMLDOMDocument > XMLDOMDocumentPtr
Definition xml.h:34
LOG4CXX_PTR_DEF(Object)
std::shared_ptr< XMLDOMNodeList > XMLDOMNodeListPtr
Definition xml.h:37
std::shared_ptr< XMLDOMNode > XMLDOMNodePtr
Definition xml.h:31
std::basic_string< logchar > LogString
Definition logstring.h:51
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition object.h:37