Hi,

I hv a class like this
XMLData()
{
public:

~CXMLData();
static CXMLData* NewL();
static CXMLData* NewLC();
private :
CXMLData();
void ConstructL();

private:
HBufC* elementName;
RPointerArray<HBufC> attibutesNameValue;
HBufC* contents;

}


Then I have created an array of objects of XMLData as follows:

I declared an array as the member of XMLHandler class.

RPointerArray<CXMLData> elementArray;

On CXmlHandler::OnStartElementL( const RTagInfo& aElement,
const RAttributeArray& aAttributes, TInt aErrorCode ) I am going to store
the element name value in the elementName member.The code(half written) is as follows that gives me
KERN EXEC 3 Panic.

Pls help me in resolving the panic and in storing the element name in elemntName varibale.(I am being confused in using descrioptors properly here )

<code>void CXmlHandler::OnStartElementL( const RTagInfo& aElement,
const RAttributeArray& aAttributes, TInt aErrorCode )
{


if ( KErrNone == aErrorCode )
{
// If we find the start of an element, we write to the screen,
// for example: "<tag>"
AppendTag( aElement.LocalName().DesC(), EFalse );

// assign the element name to the element object
CXMLData* xmlElement= CXMLData::NewLC();
TBuf8<15> name=aElement.LocalName().DesC();
//HBufC* name16 = Copy8To16L(name);
CAknInformationNote* aiNote = new (ELeave)CAknInformationNote;
aiNote->ExecuteLD(_L("OK UPTO HERE "));


//xmlElement->elementName->Copy(name16,name.Length());
TPtr ptr(xmlElement->elementName->Des());
ptr.Copy(name);




TInt count = aAttributes.Count();
for(TInt i=0; i<count; i++)
{
TBuf8<20> name = aAttributes[i].Attribute().LocalName().DesC();
HBufC *buf=HBufC::NewLC(name.Length());
buf->Des().Copy(name);


/*TBuf8<100> value= aAttributes[i].Value().DesC();
HBufC *bufVal=HBufC::NewLC(value.Length());
bufVal->Des().Copy(value);*/

TBuf8<10> code(_L8("Code"));

if(code==name)
{

CAknInformationNote* iNote = new (ELeave)CAknInformationNote;
iNote->ExecuteLD(*buf);

}

CleanupStack::PopAndDestroy(); // buf

}


//Add the parsed element object to the array of elements
elementArray.AppendL(xmlElement);
}
else
{
iObserver.OnParseCompleted( aErrorCode );
}
}</code>

Thanks,
--Netra