Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700

Re: Deserialize XML to object

Peter.

 

2  major reasons really. 

 

1.  The head of development for this app sees further developments  with soap communication

2.  the current XML stream is rather complex with nested menu objects.

 

 

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700

Re: Deserialize XML to object

So I turned to basics. Installed the XMLDemo and run it OK.

Changed to my XML file and got strange results. The XML file is created by a C# serializer and I have  taken out a part of it: to test and trying to analyze the problem .See attachment..

 

I have made no changes to the sample  except for the file name and I have not tried to handle the attributes yet

 

The output:

 

mob:application
    menu
        menu
            action
                formitem = "
           "
        menu
            action = "
        "

 

 

 

 

 

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700

Re: Deserialize XML to object

Finally found some excellent code using the SAXparser and an override of  "DefaultHandler"

 

Got hold of  elements and attributes ok . What's left is to create the objects but that is fairly straight forward

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.