1//
2// AttrMap.h
3//
4// Library: XML
5// Package: DOM
6// Module: DOM
7//
8// Definition of the AttrMap class.
9//
10// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
11// and Contributors.
12//
13// SPDX-License-Identifier: BSL-1.0
14//
15
16
17#ifndef DOM_AttrMap_INCLUDED
18#define DOM_AttrMap_INCLUDED
19
20
21#include "Poco/XML/XML.h"
22#include "Poco/DOM/NamedNodeMap.h"
23
24
25namespace Poco {
26namespace XML {
27
28
29class Element;
30
31
32class XML_API AttrMap: public NamedNodeMap
33 // This implementation of NamedNodeMap is
34 // returned by Element::attributes()
35{
36public:
37 Node* getNamedItem(const XMLString& name) const;
38 Node* setNamedItem(Node* arg);
39 Node* removeNamedItem(const XMLString& name);
40 Node* item(unsigned long index) const;
41 unsigned long length() const;
42
43 Node* getNamedItemNS(const XMLString& namespaceURI, const XMLString& localName) const;
44 Node* setNamedItemNS(Node* arg);
45 Node* removeNamedItemNS(const XMLString& namespaceURI, const XMLString& localName);
46
47 void autoRelease();
48
49protected:
50 AttrMap(Element* pElement);
51 ~AttrMap();
52
53private:
54 AttrMap();
55
56 Element* _pElement;
57
58 friend class Element;
59};
60
61
62} } // namespace Poco::XML
63
64
65#endif // DOM_AttrMap_INCLUDED
66