aspose file tools*
The moose likes Flex and the fly likes How to load XML file into XML object in mxml? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "How to load XML file into XML object in mxml?" Watch "How to load XML file into XML object in mxml?" New topic
Author

How to load XML file into XML object in mxml?

Jahnvi Pathak
Greenhorn

Joined: Apr 26, 2009
Posts: 10
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.


There is no such thing as a stupid question, there are stupid people who are afraid to ask.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jahnvi Pathak
Greenhorn

Joined: Apr 26, 2009
Posts: 10
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to load XML file into XML object in mxml?
 
Similar Threads
problem in closures
Thread & Lock
Question about sunchronized of thread
confuse on the answer
Applet doesn't respond???