P6R::p6ISAX2Attributes Interface Reference

This interface is created by the p6ISAX2XMLReader component and returned to the application via the P6R::p6ISAX2ContentHandler::startElement() method. More...

#include <p6sax2attributes.h>

Inherits P6R::p6ICom.

List of all members.

Public Member Functions

virtual P6R::P6INT32 addref ()=0
 This method increases the reference count of the component instance by one.
virtual P6R::P6ERR getIndexByQName (P6SAX2STRING *pQName, P6UINT32 *pIndex)=0
 Given the full qualified name (i.e., <namespace>:<attribute name>, like 'X:abc='), return the index value into an array of all attributes stored in this object.
virtual P6R::P6ERR getIndexByURI (P6SAX2STRING *pURI, P6SAX2STRING *pLocalName, P6UINT32 *pIndex)=0
 Given the namespace URI and local name (e.g., given 'X:abc=', 'abc' is referred to as the local name) return the index value into an array of all attributes stored in this object.
virtual P6R::P6ERR getLength (P6UINT32 *pLength)=0
 Return the number of attributes in the attribute array stored in this object.
virtual P6R::P6ERR getLocalName (P6UINT32 index, P6SAX2STRING *pString)=0
 Get the local name of the attribute identified by index into the attribute list.
virtual P6R::P6ERR getQName (P6UINT32 index, P6SAX2STRING *pString)=0
 Get the QName of the attribute identified by index into the attribute list.
virtual P6R::P6ERR getTypeByIndex (P6UINT32 index, P6SAX2STRING *pString)=0
 Get the attributes type identified by index into the attribute list.
virtual P6R::P6ERR getTypeByQName (P6SAX2STRING *pQName, P6SAX2STRING *pString)=0
 Get the attributes type identified by QName as a lookup key into the attribute list.
virtual P6R::P6ERR getTypeByURI (P6SAX2STRING *pURI, P6SAX2STRING *pLocalName, P6SAX2STRING *pString)=0
 Get the attributes type identified by a namespace as a lookup key into the attribute list.
virtual P6R::P6ERR getURI (P6UINT32 index, P6SAX2STRING *pString)=0
 Get the URI that is associated with the attribute located at index in the attribute list stored in this object.
virtual P6R::P6ERR getValueByIndex (P6UINT32 index, P6SAX2STRING *pString)=0
 Find an attribute via an index into an attribute list.
virtual P6R::P6ERR getValueByQName (P6SAX2STRING *pQName, P6SAX2STRING *pString)=0
 Find an attribute using a QName as a lookup key.
virtual P6R::P6ERR getValueByURI (P6SAX2STRING *pURI, P6SAX2STRING *pLocalName, P6SAX2STRING *pString)=0
 Find an attribute using a namespace as a lookup key.
virtual P6R::P6ERR queryInterface (const P6R::IID &iid, P6R::P6VOID **ppIface)=0
 This method queries the component for a specific interface.
virtual P6R::P6INT32 release ()=0
 This method decrements a components reference count.

Detailed Description

This interface is created by the p6ISAX2XMLReader component and returned to the application via the P6R::p6ISAX2ContentHandler::startElement() method.

Note, that P6SAX2STRING points into the application's buffer passed into the p6IDataStream::processStream() method. Thus these pointers are only valid as long as the XML Reader holds the buffer. Also P6SAX2STRING variables that define namespace items (i.e., URI) are only valid as long as that namespace is in scope. Once the namespace goes out of scope then all strings for that namespace are freed.

The benefits of this pointer design is that the XML Reader does very few internal memory allocations and copying of XML data. The using application should use the pointers immediately when they are provided during a callback to p6ISAX2ContentHandler component or make a copy of the data itself.

Definition at line 38 of file p6sax2attributes.h.


The documentation for this interface was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.