5 This file is part of KIllustrator.
6 Copyright (C) 1998 Kai-Uwe Sattler (kus@iti.cs.uni-magdeburg.de)
8 modified for kvoctrain by Ewald Arnold kvoctrain@ewald-arnold.dein April ยด99
10 -----------------------------------------------------------------------
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU Library General Public License as
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU Library General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 #include "XmlElement.h"
32 XmlAttribute::XmlAttribute (const KOXML_STRING
& n
, const KOXML_STRING
& v
) :
33 aname (n
), value (v
) {
37 XmlAttribute::XmlAttribute (const XmlAttribute
& attr
) :
38 aname (attr
.aname
), value (attr
.value
) {
41 XmlAttribute::~XmlAttribute () {
45 XmlAttribute
& XmlAttribute::operator= (const XmlAttribute
& attr
) {
52 float XmlAttribute::floatValue () const {
54 return atof (value
.local8Bit());
56 return atof (value
.data());
61 int XmlAttribute::intValue () const {
63 return atoi (value
.local8Bit());
65 return atoi (value
.data());
70 XmlElement::XmlElement () {
76 XmlElement::XmlElement (const XmlElement
& elem
) :
77 tagId (elem
.tagId
), closed (elem
.closed
), endTag (elem
.endTag
),
78 attribs (elem
.attribs
) {
82 XmlElement::~XmlElement () {
86 void XmlElement::reset () {
90 attribs
.erase (attribs
.begin (), attribs
.end ());
94 XmlElement
& XmlElement::operator= (const XmlElement
& elem
) {
98 attribs
= elem
.attribs
;