This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to load XML file into XML object in mxml?

 
Jahnvi Pathak
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having an XML file. I am loading XML data into XML object. The code is as below.


I am calling this arrangeComps() on button's click event. btn1 is my custom component having setX and setY methods, same for txt1. Now when I am accessing XML data i.e. myXML.button.x, it gives me following error. And when I debug it also doesn't go into xmlLoaded() function.


Can anybody please tell me what's the problem here?

Thanks.

Jahnvi.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

And when I debug it also doesn't go into xmlLoaded() function.

There is your problem. Try handling some of the other events URLLoader can dispatch, particularaly ioError or SecurityError.

 
Jahnvi Pathak
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul.

I caught my mistake. There was some file path error. I placed data.xml at proper place and now it runs perfectly.

- Jahnvi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic