PDA

View Full Version : create XML Data in Flash


belamumu
05-26-2011, 05:43 AM
hello guys some people plz help me whats wrong with my code i try to put my basic xml code to the flash after showing this message in the flash <title> Adventures </title> how to solve this problem . I really appreciate [AS] var xmlObjectName:XML;
var bookstore:XML;
bookstore=
<class>
<book category>"Children">
<title>the felowship of the rings </title>
<author>J.R.R Tolkien</author>
<year> 1955</year>
<price> 29.99 </price>
<book>
<book category>"adult"</book category>
<title> the presidents. Vampire </title>
<author> Christoper Farnsworth </author>
<year> 2011</year>
<price>19.95</price>
</book>
</bookstore>
</bookstore>
<books>
<book category >"mystery"</bookcategory>
<title> Adventures </title>
<author>Sir Arthur Conan Doyle</author>
<year>1995</year>
<price> 20.00 </price>
</book>
trace(bookstore);
[AS]

uday_sgh
05-27-2011, 08:46 AM
Here is the correct format for your xml:

<class>
<book category="xyz">
<title>the felowship of the rings </title>
<author>J.R.R Tolkien</author>
<year> 1955</year><price> 29.99 </price>
</book>
<book category="adult">
<title> the presidents. Vampire </title>
<author> Christoper Farnsworth </author>
<year> 2011</year>
<price>19.95</price>
</book>
<book category="mystery">
<title> Adventures </title>
<author>Sir Arthur Conan Doyle</author>
<year>1995</year>
<price> 20.00 </price>
</book>
</class>


You need study more about xml instead to posting these kinds of childhood questions.
I hope this kind of work you can learn within 2-3 days.
If you have any more query plz let me know

Thanks,
Uday

Norhan Adel
07-04-2011, 02:55 PM
like