473,785 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get some info from my XML?

1 New Member
I want to grab the amount of images in each <subnumber> section. How?

I have this code in Flash;

Expand|Select|Wrap|Line Numbers
  1. var pArray = new Array();
  2. var tArray = new Array();
  3.  
  4. var myXML:XML = new XML();
  5. myXML.ignoreWhite = true;
  6. myXML.onLoad = function (success:Boolean):Void {
  7.     if (success) {
  8.         var xmlData = this.firstChild.childNodes[0].childNodes[0];
  9.         for (var i = 0; i<xmlData.childNodes.length; i++) {
  10.             pArray.push(xmlData.childNodes[i].childNodes[0].firstChild.nodeValue);
  11.             tArray.push(xmlData.childNodes[i].childNodes[1].firstChild.nodeValue);
  12.         }
  13.         containerMC.loadPic(0);
  14.         picInfo.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_fadeIn);
  15.     } else {
  16.         picInfo.text = "Unable to load external file.";
  17.     }
  18. }
  19. myXML.load("xml/XMLdata.xml")
And this is my XML in short:

[PHP]<?xml version="1.0" encoding="iso-8859-1" ?>

<xmlData>
<main>
<subnumber>
<subinfo>
<path>main1/images1/01.jpg</path>
<info><![CDATA[<p>main1, sub1</p>]]></info>
</subinfo>
<subinfo>
<path>main1/images1/02.jpg</path>
<info></info>
</subinfo>
<subinfo>
<path>main1/images1/03.jpg</path>
<info></info>
</subinfo>
</subnumber>
<subnumber>
<subinfo>
<path>main1/images2/01.jpg</path>
<info><![CDATA[<p>main1, sub2</p>]]></info>
</subinfo>
<subinfo>
<path>main1/images2/02.jpg</path>
<info></info>
</subinfo>
</subnumber>
</main>
</xmlData>[/PHP]
Oct 24 '06 #1
0 2136

Sign in to post your reply or Sign up for a free account.

Similar topics

7
6059
by: ivan_oj28 | last post by:
Hi, I am developing an application where I need to read the caller id from an incoming call. The only info (for now) I need is the caller id info, so that I can display the propper caller info on screen if so desired. I was thinking on using asterisk (asterisk.org) for this with appropriate 2FXO/2FXS card but I do not know if this is just overkill (asterisk for this). Do you know of any other solution/way of getting the caller id and...
10
6795
by: Frank | last post by:
Using Python 2.2.2, I want to catch all exceptions from "socket.gethostbyaddr(ip)" From IDLE, I can generate: >>> socket.gethostbyaddr('1.2') Traceback (most recent call last): File "<pyshell#28>", line 1, in ? socket.gethostbyaddr('1.2') herror: (11004, 'host not found') <=== what I want when I catch
4
3306
by: Chris | last post by:
I'm wondering what is the "best" way to structure a set of info about an item, like a book or a hotel. Eg, let's say you had this info to present for each book in a collection: Title Author Publisher Edition info etc
4
10755
by: Alberto | last post by:
Could you tell me what it's for the "Persist Security Info ..." value in a connection string. Thank you.
5
1429
by: Lloyd Dupont | last post by:
I'm trying to print some of my document. The problem is, the rendering of the document is not done through GDI+ at all but through plain old GDI, and I need it like that as I am using Uniscribe to layout text. Anyway, when printing the text is completely out of place, I wonder if it's due to incorrrect Dpi settings? (or something else?) I will investigate that..... Anyway if any of you had similar experience and could shed some light?...
1
1573
by: Mr. B | last post by:
VB.net 2003 c/w Framework 1.1 and MS Access db We have a commercial program that does our Acounting and Time Sheets (Timberline). At least once a day our Accounting department runs a Script file that Exports info into an MS Access db file and which has 7 Tables (stuff like Project info, Project numbers, User names, etc). I wrote a Time Sheet entry application to read this info and to allow Employees to write their Time Sheet data into...
1
5821
by: oddbande | last post by:
We have just upgraded a test enviroment to db2 9, and have set both the notifylevel and diaglevel to 3. But even so I get a lot of these messages in my db2diag.log: 2006-11-02-00.10.11.951000+060 I326548H465 LEVEL: Info PID : 3008 TID : 4072 PROC : db2dasstm.exe INSTANCE: DB2 NODE : 000 APPID : *LOCAL.DB2.061101231048 FUNCTION: DB2 UDB, DRDA Communication Manager, sqljcReceive,...
1
3606
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one that uploads to photo to the folder in the site root diorectory. One that uploads the info to mysql database. but... When I try to upload them both ways at the same time i cant get it. I am Including code for both pages i have working. Code for...
9
1835
by: PomonaGrange | last post by:
HI All, I've been trying to make a membership management type script. This script would have a database with the members contact info and which office they hold, if any. The problem I am having is I would like the script to show the president's and vice president's Contact info all the time, but hide the contact info for everyone else when viewed by the general public, then if the user logs in all contact information is displayed, for everyone....
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.