Apache Log4cxx
Version 2.0.0
Toggle main menu visibility
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
>
22
#include <
log4cxx/helpers/object.h
>
23
#include <
log4cxx/helpers/exception.h
>
24
25
namespace
LOG4CXX_NS
26
{
27
class
File;
28
namespace
helpers
29
{
30
class
XMLDOMNode;
31
typedef
std::shared_ptr<XMLDOMNode>
XMLDOMNodePtr
;
32
33
class
XMLDOMDocument
;
34
typedef
std::shared_ptr<XMLDOMDocument>
XMLDOMDocumentPtr
;
35
36
class
XMLDOMNodeList
;
37
typedef
std::shared_ptr<XMLDOMNodeList>
XMLDOMNodeListPtr
;
38
39
class
LOG4CXX_EXPORT
DOMException
:
public
RuntimeException
40
{
41
public
:
42
DOMException
() :
RuntimeException
(LOG4CXX_STR(
"DOM exception"
)) {}
43
};
44
45
50
class
LOG4CXX_EXPORT
XMLDOMNode
51
:
public
Object
52
{
53
public
:
54
DECLARE_ABSTRACT_LOG4CXX_OBJECT
(
XMLDOMNode
)
55
enum
XMLDOMNodeType
56
{
57
NOT_IMPLEMENTED_NODE
= 0,
58
ELEMENT_NODE
= 1,
59
DOCUMENT_NODE
= 9
60
};
61
62
virtual
XMLDOMNodeListPtr
getChildNodes
() = 0;
63
virtual
XMLDOMNodeType
getNodeType
() = 0;
64
virtual
XMLDOMDocumentPtr
getOwnerDocument
() = 0;
65
};
66
LOG4CXX_PTR_DEF
(
XMLDOMNode
);
67
68
72
class
LOG4CXX_EXPORT
XMLDOMElement
73
:
public
XMLDOMNode
74
{
75
public
:
76
DECLARE_ABSTRACT_LOG4CXX_OBJECT
(
XMLDOMElement
)
77
virtual
LogString
getTagName
() = 0;
78
virtual
LogString
getAttribute
(const
LogString
& name) = 0;
79
};
80
LOG4CXX_PTR_DEF
(
XMLDOMElement
);
81
88
class LOG4CXX_EXPORT
XMLDOMDocument
89
: public
XMLDOMNode
90
{
91
public
:
92
DECLARE_ABSTRACT_LOG4CXX_OBJECT
(
XMLDOMDocument
)
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
};
98
LOG4CXX_PTR_DEF
(
XMLDOMDocument
);
99
110
class LOG4CXX_EXPORT
XMLDOMNodeList
111
: public
Object
112
{
113
public
:
114
DECLARE_ABSTRACT_LOG4CXX_OBJECT
(
XMLDOMNodeList
)
115
virtual
int
getLength
() = 0;
116
virtual
XMLDOMNodePtr
item
(
int
index) = 0;
117
};
118
LOG4CXX_PTR_DEF
(
XMLDOMNodeList
);
119
}
// namespace helpers
120
}
// namespace log4cxx
121
122
#endif
// _LOG4CXX_HELPERS_XML_H
123
log4cxx::File
An abstract representation of file and directory path names.
Definition
file.h:41
log4cxx::helpers::DOMException::DOMException
DOMException()
Definition
xml.h:42
log4cxx::helpers::Object
base class for java-like objects.
Definition
object.h:102
log4cxx::helpers::RuntimeException::RuntimeException
RuntimeException(log4cxx_status_t stat)
log4cxx::helpers::XMLDOMDocument
The XMLDOMDocument interface represents an entire XML document.
Definition
xml.h:90
log4cxx::helpers::XMLDOMDocument::getDocumentElement
virtual XMLDOMElementPtr getDocumentElement()=0
log4cxx::helpers::XMLDOMDocument::load
virtual void load(const File &fileName)=0
log4cxx::helpers::XMLDOMDocument::getElementById
virtual XMLDOMElementPtr getElementById(const LogString &tagName, const LogString &elementId)=0
log4cxx::helpers::XMLDOMElement
The XMLDOMElement interface represents an element in an XML document.
Definition
xml.h:74
log4cxx::helpers::XMLDOMElement::getAttribute
virtual LogString getAttribute(const LogString &name)=0
log4cxx::helpers::XMLDOMElement::getTagName
virtual LogString getTagName()=0
log4cxx::helpers::XMLDOMNodeList
The XMLDOMNodeList interface provides the abstraction of an ordered collection of nodes,...
Definition
xml.h:112
log4cxx::helpers::XMLDOMNodeList::getLength
virtual int getLength()=0
log4cxx::helpers::XMLDOMNodeList::item
virtual XMLDOMNodePtr item(int index)=0
log4cxx::helpers::XMLDOMNode
The XMLDOMNode interface is the primary datatype for the entire Document Object Model.
Definition
xml.h:52
log4cxx::helpers::XMLDOMNode::getNodeType
virtual XMLDOMNodeType getNodeType()=0
log4cxx::helpers::XMLDOMNode::XMLDOMNodeType
XMLDOMNodeType
Definition
xml.h:56
log4cxx::helpers::XMLDOMNode::NOT_IMPLEMENTED_NODE
@ NOT_IMPLEMENTED_NODE
Definition
xml.h:57
log4cxx::helpers::XMLDOMNode::DOCUMENT_NODE
@ DOCUMENT_NODE
Definition
xml.h:59
log4cxx::helpers::XMLDOMNode::ELEMENT_NODE
@ ELEMENT_NODE
Definition
xml.h:58
log4cxx::helpers::XMLDOMNode::getChildNodes
virtual XMLDOMNodeListPtr getChildNodes()=0
log4cxx::helpers::XMLDOMNode::getOwnerDocument
virtual XMLDOMDocumentPtr getOwnerDocument()=0
exception.h
logstring.h
log4cxx::helpers::XMLDOMDocumentPtr
std::shared_ptr< XMLDOMDocument > XMLDOMDocumentPtr
Definition
xml.h:34
log4cxx::helpers::LOG4CXX_PTR_DEF
LOG4CXX_PTR_DEF(Object)
log4cxx::helpers::XMLDOMNodeListPtr
std::shared_ptr< XMLDOMNodeList > XMLDOMNodeListPtr
Definition
xml.h:37
log4cxx::helpers::XMLDOMNodePtr
std::shared_ptr< XMLDOMNode > XMLDOMNodePtr
Definition
xml.h:31
log4cxx::LogString
std::basic_string< logchar > LogString
Definition
logstring.h:51
object.h
DECLARE_ABSTRACT_LOG4CXX_OBJECT
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition
object.h:37
src
main
include
log4cxx
helpers
xml.h
Generated by
1.18.0 on
SITE_PUBLISHED_DATE
Copyright © 2017-2026
Apache Software Foundation
. Apache, Chainsaw, log4cxx, Log4j, Log4net, log4php and the Apache logo are
trademarks or registered trademarks
of The Apache Software Foundation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Privacy Policy
.