Module: XML Streams Package: XML Streams
Does not inherit
#include <rw/xmlstreams/RWXmlStreamElement.h>
An XML element abstraction for implementing efficient C++ based transformations.
typedef char element_type;
RWXmlStreamElement(const std::list<std::pair<RWCString,
RWXmlNamespace> >& namespaces);
This constructor takes a set of namespaces valid in the scope of this element. The parameter namespaces holds a set of RWCString/RWXmlNamespace pairs.
RWXmlStreamElement(const RWXmlNmae& name,
const RWCString value,
const std::list<std::pair<RWCString,
RWXmlNamespace>>& namespaces);
This constructor takes a name for the element, a CDATA value, and a list of namespaces. The parameter name contains a name for this element. The parameter value contains CDATA for the content of this element. The parameter namespaces holds a set of RWCString/RWXmlNamespace pairs.
RWXmlStreamElement(const RWXmlNmae& name,
const RWXmlStreamElement& element
const std::list<std::pair<RWCString,
RWXmlNamespace>>& namespaces);
This constructor takes a name for the element, an element value, and a list of namespaces. The parameter name contains a name for this element. The parameter element contains an element for the content of this element. The parameter namespaces holds a set of RWCString/RWXmlNamespace pairs.
RWXmlStreamElement(const RWXmlStreamElement& element);
This is a copy constructor. The parameter element contains the element to copy.
void addAttribute(const RWXmlAttribute& attribute);
Adds an attribute. The parameter attribute contains the attribute to add.
void addElement(const RWXmlStreamElement& element);
Adds an element to the set contained by this. The parameter element contains the element to add.
void addNamespace(const RWCString& prefix,
const RWXmlNamespace& fullname);
Adds a namespace to the set valid for this element. If the namespace is already present, this operation will replace it. The parameter prefix contains the namespace prefix (synonym). The parameter fullname contains the full namespace (prefix and URI).
void deleteAttribute(const RWXmlName& name);
Deletes an attribute. The parameter name contains the name of the attribute to be deleted.
void deleteElement(const RWXmlName& name);
Deletes an element from the set contained by this. Removes the first element with a matching name. The parameter name contains the name of the element to be deleted.
bool deleteNamespace(const RWCString& prefix);
Deletes an namespace from the set valid for this element. The parameter prefix contains the prefix of the namespace to be deleted.
RWCString findAttribute(const RWXmlName& name) const;
Finds an attribute. The parameter name contains the name of the attribute to locate. Returns the value of the attribute, or RWCString() if none is found.
const RWXmlStreamElement findElement(const RWXmlName& name) const;
Finds an element in the set contained by this. The parameter name contains the name of the element to locate. Returns the first element with a matching name.
const RWXmlNamespace findNamespaceURI(const RWCString& prefix) const;
Finds the URI for a namespace. The parameter prefix contains the name of the namespace. Returns the URI for the namespace if present, otherwise returns RWCString().
const RWXmlStreamElement findNextElement(const RWXmlName& name,
std::list<RWXmlStreamElement*>::const_interator start) const;
Finds an element in the set contained by this. The parameter name contains the name of the element to locate. The parameter start contains the iterator where the search starts. Returns the first element after start with a matching name.
const RWXmlAttributeSet& getAttributes() const;
Gets the element's attributes. Returns the set of attributes for this element.
const std::list<RWXmlStreamElement*>& getElements() const;
Gets the set of sub-elements. Returns the set of elements contained in this element.
RWXmlName getName() const;
Gets the element's name. Returns the name of this element.
const std::list<std::pair<RWCString,RWXmlNamespace>>& getNamespaces() const;
Gets the elements namespaces. Returns the set of namespaces active for this element.
void getValue() const;
Gets the element's value. Returns the value for this element.
void resolveNamespaces();
Resolves the namespace URIs.
void setName(const RWXmlName& name);
Sets the element's name. The parameter name contains a name for this element.
void setValue(const RWCSting& value);
Sets a value for the element.
void setValue(const RWXmlStreamElement& element);
Adds an element to the set contained by this. The parameter element contains the element to add.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.