unable to load xml

  • esse_bi
  • Novice
  • Novice
  • esse_bi
  • Posts: 15

Post 3+ Months Ago

Hi,
I cannot load an xml file, but I think I wrote the right code:

mioXml = new XML()
mioXml.ignoreWhite = true
mioXml.load("phil/"+myvar+"/gallery.xml")
mioXml.onLoad = parsingXML()
function parsingXML(success) {
if (success) {
caricare();
trace("caricamento avvenuto");
}
}

this is my xml file
<?xml version="1.0" encoding="UTF-8"?>
<philgallery>
<image>
<nome>mue</nome>
<nome2>mae</nome2>
</image>
<image>
<nome>zue</nome>
<nome2>phil 4</nome2>
</image>
<image>
<nome>cue</nome>
<nome2>phil 6</nome2>
</image>
<image>
<nome>kie</nome>
<nome2>phil 8</nome2>
</image>
</philgallery>

Have I forgotten something ???
thx a lot
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

I think the issue is in what your calling with the XML.onLoad. Try this instead
Code: [ Select ]
mioXml = new XML()
mioXml.ignoreWhite = true
mioXml.load("phil/"+myvar+"/gallery.xml")
mioXml.onLoad = function(success) {
if (success) {
caricare();
trace(mioXml);
trace("caricamento avvenuto");
}
}
  1. mioXml = new XML()
  2. mioXml.ignoreWhite = true
  3. mioXml.load("phil/"+myvar+"/gallery.xml")
  4. mioXml.onLoad = function(success) {
  5. if (success) {
  6. caricare();
  7. trace(mioXml);
  8. trace("caricamento avvenuto");
  9. }
  10. }

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 18 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.