Poco::XML

class AttributesImpl

Library: XML
Package: SAX
Header: Poco/SAX/AttributesImpl.h

Description

This class provides a default implementation of the SAX2 Attributes interface, with the addition of manipulators so that the list can be modified or reused.

There are two typical uses of this class:

  1. to take a persistent snapshot of an Attributes object in a startElement event; or
  2. to construct or modify an Attributes object in a SAX2 driver or filter.

Inheritance

Direct Base Classes: Attributes

All Base Classes: Attributes

Member Summary

Member Functions: addAttribute, begin, clear, end, find, getIndex, getLength, getLocalName, getQName, getType, getURI, getValue, isSpecified, operator =, removeAttribute, setAttribute, setAttributes, setLocalName, setQName, setType, setURI, setValue

Inherited Functions: getIndex, getLength, getLocalName, getQName, getType, getURI, getValue

Nested Classes

struct Attribute

 more...

Types

AttributeVec

typedef std::vector < Attribute > AttributeVec;

iterator

typedef AttributeVec::const_iterator iterator;

Constructors

AttributesImpl

AttributesImpl();

Creates the AttributesImpl.

AttributesImpl

AttributesImpl(
    const Attributes & attributes
);

Creates the AttributesImpl by copying another one.

AttributesImpl

AttributesImpl(
    const AttributesImpl & attributes
);

Creates the AttributesImpl by copying another one.

Destructor

~AttributesImpl virtual

~AttributesImpl();

Destroys the AttributesImpl.

Member Functions

addAttribute

void addAttribute(
    const XMLString & namespaceURI,
    const XMLString & localName,
    const XMLString & qname,
    const XMLString & type,
    const XMLString & value
);

Adds an attribute to the end of the list.

addAttribute

void addAttribute(
    const XMLString & namespaceURI,
    const XMLString & localName,
    const XMLString & qname,
    const XMLString & type,
    const XMLString & value,
    bool specified
);

Adds an attribute to the end of the list.

addAttribute

void addAttribute(
    const XMLChar * namespaceURI,
    const XMLChar * localName,
    const XMLChar * qname,
    const XMLChar * type,
    const XMLChar * value,
    bool specified
);

Adds an attribute to the end of the list.

begin inline

iterator begin() const;

Iterator support.

clear

void clear();

Removes all attributes.

end inline

iterator end() const;

Iterator support.

getIndex virtual

int getIndex(
    const XMLString & name
) const;

See also: Poco::XML::Attributes::getIndex()

getIndex virtual

int getIndex(
    const XMLString & namespaceURI,
    const XMLString & localName
) const;

See also: Poco::XML::Attributes::getIndex()

getLength virtual

int getLength() const;

See also: Poco::XML::Attributes::getLength()

getLocalName virtual

XMLString getLocalName(
    int i
) const;

See also: Poco::XML::Attributes::getLocalName()

getQName virtual

XMLString getQName(
    int i
) const;

See also: Poco::XML::Attributes::getQName()

getType virtual

XMLString getType(
    int i
) const;

See also: Poco::XML::Attributes::getType()

getType virtual

XMLString getType(
    const XMLString & qname
) const;

See also: Poco::XML::Attributes::getType()

getType virtual

XMLString getType(
    const XMLString & namespaceURI,
    const XMLString & localName
) const;

See also: Poco::XML::Attributes::getType()

getURI virtual

XMLString getURI(
    int i
) const;

See also: Poco::XML::Attributes::getURI()

getValue virtual

XMLString getValue(
    int i
) const;

See also: Poco::XML::Attributes::getValue()

getValue virtual

XMLString getValue(
    const XMLString & qname
) const;

See also: Poco::XML::Attributes::getValue()

getValue virtual

XMLString getValue(
    const XMLString & namespaceURI,
    const XMLString & localName
) const;

See also: Poco::XML::Attributes::getValue()

isSpecified

bool isSpecified(
    int i
) const;

Returns true unless the attribute value was provided by DTD defaulting. Extension from Attributes2 interface.

isSpecified

bool isSpecified(
    const XMLString & qname
) const;

Returns true unless the attribute value was provided by DTD defaulting. Extension from Attributes2 interface.

isSpecified

bool isSpecified(
    const XMLString & namespaceURI,
    const XMLString & localName
) const;

Returns true unless the attribute value was provided by DTD defaulting. Extension from Attributes2 interface.

operator =

AttributesImpl & operator = (
    const AttributesImpl & attributes
);

Assignment operator.

removeAttribute

void removeAttribute(
    int i
);

Removes an attribute.

removeAttribute

void removeAttribute(
    const XMLString & qname
);

Removes an attribute.

removeAttribute

void removeAttribute(
    const XMLString & namespaceURI,
    const XMLString & localName
);

Removes an attribute.

setAttribute

void setAttribute(
    int i,
    const XMLString & namespaceURI,
    const XMLString & localName,
    const XMLString & qname,
    const XMLString & type,
    const XMLString & value
);

Sets an attribute.

setAttributes

void setAttributes(
    const Attributes & attributes
);

Copies the attributes from another Attributes object.

setLocalName

void setLocalName(
    int i,
    const XMLString & localName
);

Sets the local name of an attribute.

setQName

void setQName(
    int i,
    const XMLString & qname
);

Sets the qualified name of an attribute.

setType

void setType(
    int i,
    const XMLString & type
);

Sets the type of an attribute.

setURI

void setURI(
    int i,
    const XMLString & namespaceURI
);

Sets the namespace URI of an attribute.

setValue

void setValue(
    int i,
    const XMLString & value
);

Sets the value of an attribute.

setValue

void setValue(
    const XMLString & qname,
    const XMLString & value
);

Sets the value of an attribute.

setValue

void setValue(
    const XMLString & namespaceURI,
    const XMLString & localName,
    const XMLString & value
);

Sets the value of an attribute.

find protected

Attribute * find(
    const XMLString & qname
) const;

find protected

Attribute * find(
    const XMLString & namespaceURI,
    const XMLString & localName
) const;