Error in XML Parsing...

Login to reply to this topic.
Wed, 2008-07-02 12:59
Joined: 2007-07-31
Forum posts: 140

Hi everybody,

i am getting a problem in xml parsing because of the value of aError = -996
why this error has came?

The class CSongListView is given below...

class CSongListView: public CAknView,public MXmlHandlerObserver
{
        TUid iIdentifier;
        CSongListViewContainer* iSongListViewContainer;       
               
public:

        ~CSongListView();
        static CSongListView* NewL();
        static CSongListView* NewLC();
       
private:
        CSongListView();
        void ConstructL();
private:
        CAlbumListView* iAlbumListView;
public:
        TUid Id() const;
        void DoActivateL(const TVwsViewId& aPrevViewId,
                   TUid aCustomMessageId,
                   const TDesC8& aCustomMessage);
    void DoDeactivate();

private: // From MXmlHandlerObserver

virtual void OnParseCompleted( TInt aError );

public: // New functions

void StartParsingL( const TDesC& aFileName );

private:
        CXmlHandler*   iXmlHandler; // to parse XML document
};

And the due to the value of aError = -996 the program crash...

void CSongListView::OnParseCompleted( TInt aError )
{
        //iXmlHandler->DisplayResult()

        if(aError == KErrNone)
        {
                iSongListViewContainer->HTTPStatus(_L("Parsing Compelete!"));
        }
       
        iSongListViewContainer->XMLInfo(iXmlHandler->GetElementCollection());
        iSongListViewContainer->DrawNow();
}

Please help me its urgent..
Actually this code is working properly in the another view...


Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++


Wed, 2008-07-02 13:22
Joined: 2003-12-05
Forum posts: 607
Re: Error in XML Parsing...

http://discussion.forum.nokia.com/forum/showthread.php?t=136855

Maybe the problem is with the actual xml data. Or that you do not use ParseL/EndParseL correctly.

Wed, 2008-07-02 13:43
Joined: 2007-07-31
Forum posts: 140
Re: Error in XML Parsing...

But this code is working properly in another view...


Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++

Wed, 2008-07-02 14:11
Joined: 2003-12-05
Forum posts: 607
Re: Error in XML Parsing...

Have you compared what's the difference between the views?

Also, consider redesigning your application architecture. The view should be only for dispaying stuff and getting user input (sometimes also commands). All logic should be somewhere else (in other classes, a.k.a. engine of the application). You wouldn't have problems like this, and porting would be easier too....

  • Login to reply to this topic.