XML > Array

  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Joined: Dec 29, 2003
  • Posts: 5169
  • Loc: SC-USA
  • Status: Offline

Post February 14th, 2004, 12:34 pm

Cool! Thanks guys.
- dM
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 14th, 2004, 12:34 pm

  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 6382
  • Loc: twitter.com/unflux
  • Status: Offline

Post February 14th, 2004, 8:42 pm

good info guys, thanks. I learned something new today :)
UNFLUX.FOTO
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post February 15th, 2004, 11:05 am

barrax wrote:
To be honest i prefer not to pass through nodenames as data but seeing as bayes had a datasource that he couldn't change i just parsed the existing tree structure like this. If i havent got much text to pass through i like to keep the values as attributes - it allows for a slimmer tree structrue and you dont have to go tunneling through various branches.

I think my method of working with XML changes everytime i tackle a job. I only like to put them into arrays so that i can sort() (plus other array functions) them if need be. I'm not so sure you can do that while they are xml objects.

Well thats my story and im sticking with it;)

B


Yeah, I know what you mean about it changing for each project... since for every project you have a different stucture and the data may have to be parsed differently in Flash.

And that story is logical, so you can stick with it ;) 8)
  • barrax
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 14, 2004
  • Posts: 12
  • Loc: Southampton, UK
  • Status: Offline

Post February 16th, 2004, 2:12 am

lol - cheers, but i didnt mean it like that.....

For example i dont usually parse xml into an array - i sometimes just access the xml objects themselves. It's only recently that i've started processing them into object arrays. oh well, each to their own etc etc.

nice forum btw - bookmarked! :)
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post February 16th, 2004, 3:45 pm

I understood what you meant... im just retarded sometimes ;)
  • jpac
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 27, 2006
  • Posts: 5
  • Status: Offline

Post May 27th, 2006, 5:48 pm

Hi,
I saw this old post and i found it very useful. Is there a possibility to select specific attributes from all nodes?... for instance, from the xml code above, extract a list of all 'creatures' with one specific attribute.. let's say 'isa=mammal' ?

thanks in advance for any comment

jp
  • iamausten
  • Born
  • Born
  • No Avatar
  • Joined: Sep 01, 2010
  • Posts: 1
  • Status: Offline

Post September 1st, 2010, 2:44 am

mate i have this same problem...the odd thing is it works with 18 objects in the array....but not 19 - it's driving me nuts!
the code below works like a dream without the 19th & final (typical) image...

does anyone know a possible workaround?

xml code below:

XML Code: [ Select ]
<?xml version="1.0" encoding="utf-8"?>
<thumbnails>
   <thumbnail filename="thumb1.jpg" url="images/image1.jpg" target="_blank"
      title="Album One Title"
      description="" />
   <thumbnail filename="thumb2.jpg" url="images/image2.jpg" target="_blank"
      title="Album Two Title"
      description="" />
   <thumbnail filename="thumb3.jpg" url="images/image3.jpg" target="_blank"
      title="Album Three Title"
      description="" />
   <thumbnail filename="thumb4.jpg" url="images/image4.jpg" target="_blank"
      title="Album Four Title"
      description="" />
   <thumbnail filename="thumb5.jpg" url="images/image5.jpg" target="_blank"
      title="Album Five Title"
      description="" />
   <thumbnail filename="thumb6.jpg" url="images/image6.jpg" target="_blank"
      title="Album Six Title"
      description="" />
   <thumbnail filename="thumb7.jpg" url="images/image7.jpg" target="_blank"
      title="Album Seven Title"
      description="" />
   <thumbnail filename="thumb8.jpg" url="images/image8.jpg" target="_blank"
      title="Album Eight Title"
      description="" />
   <thumbnail filename="thumb9.jpg" url="images/image9.jpg" target="_blank"
      title="Album Nine Title"
      description="" />
   <thumbnail filename="thumb10.jpg" url="images/image10.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb11.jpg" url="images/image11.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb12.jpg" url="images/image12.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb13.jpg" url="images/image13.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb14.jpg" url="images/image14.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb15.jpg" url="images/image15.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb16.jpg" url="images/image16.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb17.jpg" url="images/image17.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb18.jpg" url="images/image18.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
   <thumbnail filename="thumb19.jpg" url="images/image19.jpg" target="_blank"
      title="Album Ten Title"
      description="" />
</thumbnails>
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <thumbnails>
  3.    <thumbnail filename="thumb1.jpg" url="images/image1.jpg" target="_blank"
  4.       title="Album One Title"
  5.       description="" />
  6.    <thumbnail filename="thumb2.jpg" url="images/image2.jpg" target="_blank"
  7.       title="Album Two Title"
  8.       description="" />
  9.    <thumbnail filename="thumb3.jpg" url="images/image3.jpg" target="_blank"
  10.       title="Album Three Title"
  11.       description="" />
  12.    <thumbnail filename="thumb4.jpg" url="images/image4.jpg" target="_blank"
  13.       title="Album Four Title"
  14.       description="" />
  15.    <thumbnail filename="thumb5.jpg" url="images/image5.jpg" target="_blank"
  16.       title="Album Five Title"
  17.       description="" />
  18.    <thumbnail filename="thumb6.jpg" url="images/image6.jpg" target="_blank"
  19.       title="Album Six Title"
  20.       description="" />
  21.    <thumbnail filename="thumb7.jpg" url="images/image7.jpg" target="_blank"
  22.       title="Album Seven Title"
  23.       description="" />
  24.    <thumbnail filename="thumb8.jpg" url="images/image8.jpg" target="_blank"
  25.       title="Album Eight Title"
  26.       description="" />
  27.    <thumbnail filename="thumb9.jpg" url="images/image9.jpg" target="_blank"
  28.       title="Album Nine Title"
  29.       description="" />
  30.    <thumbnail filename="thumb10.jpg" url="images/image10.jpg" target="_blank"
  31.       title="Album Ten Title"
  32.       description="" />
  33.    <thumbnail filename="thumb11.jpg" url="images/image11.jpg" target="_blank"
  34.       title="Album Ten Title"
  35.       description="" />
  36.    <thumbnail filename="thumb12.jpg" url="images/image12.jpg" target="_blank"
  37.       title="Album Ten Title"
  38.       description="" />
  39.    <thumbnail filename="thumb13.jpg" url="images/image13.jpg" target="_blank"
  40.       title="Album Ten Title"
  41.       description="" />
  42.    <thumbnail filename="thumb14.jpg" url="images/image14.jpg" target="_blank"
  43.       title="Album Ten Title"
  44.       description="" />
  45.    <thumbnail filename="thumb15.jpg" url="images/image15.jpg" target="_blank"
  46.       title="Album Ten Title"
  47.       description="" />
  48.    <thumbnail filename="thumb16.jpg" url="images/image16.jpg" target="_blank"
  49.       title="Album Ten Title"
  50.       description="" />
  51.    <thumbnail filename="thumb17.jpg" url="images/image17.jpg" target="_blank"
  52.       title="Album Ten Title"
  53.       description="" />
  54.    <thumbnail filename="thumb18.jpg" url="images/image18.jpg" target="_blank"
  55.       title="Album Ten Title"
  56.       description="" />
  57.    <thumbnail filename="thumb19.jpg" url="images/image19.jpg" target="_blank"
  58.       title="Album Ten Title"
  59.       description="" />
  60. </thumbnails>
Moderator Remark: added code tags
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post September 1st, 2010, 9:50 am

iamausten wrote:
mate i have this same problem...the odd thing is it works with 18 objects in the array....but not 19 - it's driving me nuts!
the code below works like a dream without the 19th & final (typical) image...

does anyone know a possible workaround?


Post your actionscript code. I highly doubt its a problem with the xml.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Post Information

  • Total Posts in this topic: 23 posts
  • Users browsing this forum: No registered users and 33 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.