I have problem loading all items from XML with for each

Hi all,
I'm low level as3 programmer and I need help whit this code:
I have gallery XML file:
<gallery>
    <item>
        <id>1</id>
        <strana>0</strana>
        <naslov>Lokacije</naslov>
        <aktuelno>1</aktuelno>
        <slika>1.jpg</slika>
    </item>
    <item>
        <id>2</id>
        <strana>2</strana>
        <naslov>Coaching</naslov>
        <aktuelno>1</aktuelno>
        <slika>2.jpg</slika>
    </item>
    <item>
        <id>3</id>
        <strana>0</strana>
        <naslov><![CDATA[O.Å . Bratstvo - panel]]></naslov>
        <aktuelno>0</aktuelno>
        <slika>3.jpg</slika>
    </item>  
</gallery>
And:
var loader: URLLoader = new URLLoader();
     loader.load(new URLRequest("gallery.xml");
var xml = new XML(evt.target.data);
    for each(var item in xml..item) {
        centralniText.htmlText = item.slika;
only shows  last item from XML file:
3.jpg
I want all. Please help.

can adding count item in XML help somehow?
<gallery>
    <item>
        <id>1</id>
        <strana>0</strana>
        <naslov>Lokacije</naslov>
        <aktuelno>1</aktuelno>
        <slika>1.jpg</slika>
    </item>
    <item>
        <id>2</id>
        <strana>2</strana>
        <naslov>Coaching</naslov>
        <aktuelno>1</aktuelno>
        <slika>2.jpg</slika>
    </item>
    <item>
        <id>3</id>
        <strana>0</strana>
        <naslov><![CDATA[O.Å . Bratstvo - panel]]></naslov>
        <aktuelno>0</aktuelno>
        <slika>3.jpg</slika>
    </item>   
    <last>3</last>
</gallery>

Similar Messages

  • From XML (import) for each record automatic new page creation?

    Hello,
    I'm playing around with XML.
    Can someone tell me where to look and help me?
    I load variable data via XML.
    Example content xml:
    <pages>
         <page>
             <id>1</id>
             <article>title page 1</article>
             <info>Info page 1</info>
             <price>price page 1</price>
         </page>
         <page>
             <id>2</id>
             <article>title page 2</article>
             <info>Info page 2</info>
             <price>price page 2</price>
         </page>
         <page>
             <id>3</id>
             <article>title page 3</article>
             <info>Info page 3</info>
             <price>price page 3</price>
         </page>
    </pages>
    I have 1 page classified (ie 3 text boxes). The idea is that for each record in the xml (in this case 1, 2 and 3) a new page is created (Qua layout identical to the page that I had prepared, but with the corresponding data in each box)
    How do I do this?
    Thanks!

    If you need to keep the three parts of your page in separate text frames, you are probably out of luck.
    I can't tell from your question whether you know how to tag frames and import XML content into them. If you don't, the manual is fairly clear on it. However, it states more than once that "InDesign flows merged XML content into existing frames only."  That means that it won't add frames or pages for you -- you can only load XML into tagged frames on the first page and will have to add extra ones by hand.
    If you could rework your design so that all the elements could be accommodated in a single text frame, using paragraph styles to keep them apart, you could just import the XML and map tags to styles, then drag it into a frame on the first pages. If your article style was set to start in a new frame,  everything but the first would go into overset text, which you could deal with in the usual way -- shift-click on the in port of a new frame and InDesign will add the pages you need.

  • Having problem loading the gif from a jar for the frame.

    I got the gif showing up for the Toolbar fine but now trying to get the Frame icon from the same jar and having the problem.
    I have the following method in the MainFrame.
    * Load an ImageIcon, either from inside the jar file (during the normal execution)
    * or from the source path (during the development without jar file).
    public static synchronized ImageIcon LoadImageIcon(String name) {   
    try {
    URL url = ClassLoader.getSystemResource(name);
    if(url!=null) {
    return new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));
    } else {  
    return new ImageIcon(name);
    } catch(Exception e) {
    return null;
    I gave the following in the constructor of the same class i.e the MainFrame which is extending the JFrame
    this.setIconImage(LoadImageIcon("frameicon.gif").getImage());
    I am not getting the Icon. I did check the name of icon and I don't know what else to check.
    Any suggesions or what am I missing here? Thanks.

    I have these 2 statements one below the other and
    JButton btnNew = new JButton(MainFrame.LoadImageIcon("new.gif"));
    JButton btnOpenProject = new JButton(MainFrame.LoadImageIcon("open.gif"));
    for the above it gets the icon and for the below it doesn't from the jar. Why is it so? I don't understand. help me thru this. I am not getting any icon except for the new.gif. What am I doing wrong here? Thanks.

  • My iphone 3g wont load all comments from online newspaper. when I touch the "load more comments" button the little spinning spiral appears then nothing happens. Anyone else have this problem with some online newspapers?

    My iphone 3g wont load all comments from online newspaper. when I touch the "load more comments" button the little spinning spiral appears then nothing happens. Anyone else have this problem with some online newspapers?

    Anything?

  • I have installed ACDSee Pro3 and have problem to transfer photofiles from device: I got the message; The item could not be edited because you do not have sufficent access privileges or destination volume is no longer available." What can I do?

    I have installed ACDSee Pro3 and have problem to transfer photofiles from device: I got the message; The item could not be edited because you do not have sufficent access privileges or destination volume is no longer available." What can I do?

    Ask the ACDSee Pro support personnel. 
    With iPhoto that message means the library is a referenced library (photo not copied when imported into iPhoto's structure) and the source file is not where it was when first added to the library.  I don't know how ACDSee works. Does it have a referenced mode as opposed to copying photos into its structure?
    OT

  • Cj88结转报错:You have not yet settled all items from capital investment measure

    通过cj88把工程成本结转到在建工程时候系统报错
    :You have not yet settled all items from capital investment measures from the previous year.
    我看了下 对应的wbs 2008年的工程成本都没有结转。
    如何才能结转以前年度的工程成本呢
    cj88上面的几个参数 结算期间,记账期间 会计年度分别对应什么意思
    比如我现在要结算2010年8月的工程成本那对应3个栏位就是 08 08 2010
    那如果我要结算2008年工程成本 三个参数应该填什么

    你好
    如果会计年度2008在财务一侧已经关闭的了话,是没有办法我转结2008年以前的工程成本的。这种情况下,只能把报错信息AW624的状态从报错改成警告,然后把以前年度的工程成本转接到当前年度。详细的步骤可以参照SAP note 82514 和 425601.
    希望上面的回答会对你有所帮助。
    George

  • HT1338 I have down loaded an App from the Apple store. I see the icon in the the finder folder as an Itune app. Problem: an not open the

    I have down loaded an App from the Apple store. I see the icon in the the finder folder as an Itune app on my mini Mac. Problem: can not open the App-Need assistance please? The app resides in the Finder application folder.
    Works with ease on my Ipad.

    bobbydunn21@gmailcom wrote:
    Thanks
    You're Welcome.

  • "All items from purchase order cannot be invoiced"

    Hello,<br />
    <br />
    I'm on a SRM 7.0 SP 5 system (ext-classic scenario). Here i try to create an invoice with reference to a Purchase Order, but none of my Purchase Orders can be used for reference. I get the following warning message 'All items from purchase order cannot be invoiced'.<br />
    <br />
    - Created via POWL (create with reference -&gt; invoice/credit memo) i always get the warning message 'All items from purchase order cannot be invoiced'. And no items are converted / can be used for invoicing. Additionally when i use the search option 'find purchase order' within the create invoice transaction i can not find any purchase order to use, it shows 'There is no search result' while there are plenty purchase orders marked with 'invoice expected'.<br />
    <br />
    I am able to create invoices without reference.<br />
    <br />
    I tried vendors set up only for 'invoice expected' and 'GR', 'invoice expected' / 'GR' / 'GR-based-IV' and 'invoice expected' only none of them works, indicators set on vendor master are correctly used on the created purchase order. Outputting PO doesn't make any difference neither.<br />
    <p />
    I have not set up the following (do i need to?):<br />
    - Deactivated the 'CRME' transaction type, no Credit Memo transaction type has been configured/is active.<br />
    - I have not defined the 'INV' transaction type as a follow-on document for my ECPO transaction type within the define transaction type transaction.<br />
    - Tollerances<br />
    <br />
    <b>edit</b> -&gt; i've already searched thorougly for SAP notes but no note seems to cover this particular problem.<br />
    <br />
    Help is very much appreciated

    Solved! Added SYS attribute for back-end system in organisational scheme.

  • Problems loading RAW files from Canon 6D in Elements 10

    Elements 10 - Windows: I have been using the software for a couple of years and never had a problem loading RAW files from my Canon T2i ir 60D, however I just purchased a Canon 6D and when I try to load a RAW from the 6D I get Cannot open 'C:\User...CR2' because it is the wrong type of file.  I thought cameraraw 6.5 patch would be the fix but when trying to install I get "Error loading Updater workflow"

    Will the DNG files perform the same, meaning will I retain all the information that makes RAW important for processing?
    Yes. That's why DNGs were invented. Adobe has put a lot of work into the DNG format for this very reason.
    Raw files are proprietary and manufacturer specific. Raw formats change with every make and model of camera. Software must be updated for the new Raw format of every single camera. Adobe does an admirable job of upgrading Camera Raw for every new camera.
    DNG is also a Raw format but it's open source and works in any software which can read the DNG format. If camera manufacturers used the DNG format instead of their own Raw format, you would not have to upgrade Elements 10. But they don't, and probably never will, so you must upgrade the Camera Raw plugin (and therefore Elements 10 since it's not compatible with the new Camera Raw) to read the new Raw format from the 6D or add another step to your workflow with conversion to DNG first.
    See
    http://photographylife.com/dng-vs-raw
    http://www.adobe.com/products/photoshop/extend.displayTab2.html

  • HT201077 For some reason, photos taken on my iPhone did not transfer to my iPad. Apple could not help  I have now loaded the photos from my Phone to my laptop, but still cannot transfer them to the iPad. Any ideas please?

    For some reason, photos taken on my iPhone did not transfer to my iPad. Apple could not help. So I have now loaded the photos from my iPhone onto my laptop, but still cannot transfer them to the iPad. Any ideas please?

    I just had this problem as well and spent quite a bit of time reviewing all of the suggestions/ideas/comments, and since I am not that tech-savy I remembered this "suggestion" from the UK show The "IT  Crowd" which was "Have you tried turning it off and on again??" (both devices)
    http://bit.ly/18qL7OA  (apologies for short ad on the youtube clip)
    It worked!! 

  • TS3716 My relatively new ipod touch 16 gb either does not show up as a drive or everytime says it does not recognize my ipod when connected to add music.  I didn't have problems loading music originally, but this is a new occurrence.  Could you help?

    My relatively new ipod touch 16 gb either does not show up as a drive or everytime says it does not recognize my ipod when connected to add music.  I didn't have problems loading music originally, but this is a new occurrence.  Could you help?

    Hey, Thanks a lot.  It took quite a bit of time to resurrect this ipod.  I tried the upgrade again, but still would not recognize my ipod. So I went to the next step and reset my ipod, wiping of all of the information like it was new.  This helped my laptop see the ipod on itunes, but did not sync. So, I deleted the itunes off my computer completely, restarted and then reinstalled the newest itunes, and then restarted.  Finally, it recognized my ipod and started to download each song.  It took awhile as there was 602 songs, but finally it works.  Yea!!!  I never had any problem with my old nano, but this touch has been another animal for sure. Thank you again and also the community for information.  This was a helpful forum and will recommend to others if they get stuck with their ipod or iphone.  Take care, Karen

  • TS1702 i've an iphone 3.1.3. sometimes, i have problems opening all the apps i downloaded in the past 4 months. other apps would open but the recent ones will begin to boot and then close itself. once, it persisted for over a week. pls help as am frustrat

    i've an iphone 3.1.3. sometimes, i have problems opening all the apps i downloaded in the past 4 months. other apps would open but the recent ones will begin to boot and then close itself. once, it persisted for over a week. it staarted again this evening, pls help as am frustrated. NB- i checked for apps update but all my apps are up-to-date. CT

    Try the usual steps: restart, reset, restore.
    http://support.apple.com/kb/HT1430
    http://support.apple.com/kb/HT1414
    If restoring using a backup doesn't help, try restoring the iPhone to factory settings and try for a while with just the Apple-included apps, to make sure it's not an issue with a third-party app. If it still has problems, it may have a hardware problem and will need to be sent to Apple.
    Regards.

  • I have to extract all files from a hard drive of a macbook pro that is no longer working. All I have to access the hard drive is a PC, is this possible, and if so how?

    I have to extract all files from a hard drive of a macbook pro that is no longer working. All I have to access the hard drive is a PC, is this possible, and if so how?

    You could try Paragon HFS+ for Windows. That would allow you to read and write files from a Mac-formatted drive.
    Clinton

  • Hi, I have just loaded Lightroom 5 from the disc onto my Mac.  every time i try and launch the application, it goes to the registration/licence window.  i have input the data five times already.  When Lr5 launches the update window appears, when i try to

    Hi, I have just loaded Lightroom 5 from the disc onto my Mac.  every time i try and launch the application, it goes to the registration/licence window.  i have input the data five times already.  When Lr5 launches the update window appears, when i try to do anything the following message comes up: - An error occrred when attempting to change modules.  What do i need to do to fix this?

    Masher please use the uninstaller located in the Applications/Utilities/Adobe Installers folder.  Once Photoshop Lightroom is removed then please download Lightroom 5.5 from Adobe - Lightroom : For Macintosh : Adobe Photoshop Lightroom 5.5 and reinstall.

  • I have installed Lion and have problems to print PDF from prewiev.

    I have installed Lion and have problems to print PDF from prewiev. When trying to print Prewiev locks. Anyone out there with the same problem?

    Hello David and Nicole
    I just installed Lion on my iMac, which was purchased in 2007, and I cannot print from Preview; it keeps locking up and not responding. So, I have to force quit Preview. I have been sending error reports to Apple. I suggest everyone who has this problem, send error reports!
    I can print from other applications, like Pages, with my Canon Laserjet. I do not think it is a printer issue becasue I can print in other application.
    I took your advice and installed Adobe reader. Now I can print pdf's.
    Thanks
    Ed

Maybe you are looking for

  • I no longer want to merge my work laptop with my icloud account on other devices.  How can I change the setting for the laptop?

    I accidentally agreed to set up my work laptop icloud account to merge with my other devices and want to keep the work information separate.  How can I change the setting for the PC at work?

  • Bridge CS6 metadata palette not creating bag array

    I am having trouble getting a custom XML Bridge metadata palette to write bag arrays. What I want is: <dcterms:subject>     <rdf:Bag>        <rdf:li>term 1</rdf:li>        <rdf:li>term 2</rdf:li>        <rdf:li>term 3</rdf:li>     </rdf:Bag> </dcterm

  • Automatic reset

    My ipod nano is almost exactly 1 year old and I need help quick! From the main menu, whenever I click the center button, it resets the ipod. However, it only does it when I try to click on "Music". If I use the center button to select "Photos" or "Se

  • Settlemenent to an INternal Order

    Hello Gurus please help me in this issue. What is the settings that need to be made to settle an internal order to another internal order. Tcodes please? Mnay thanks MSJ

  • Credit Note of Service Entry

    Hi all I have the following situation. Created a service order for R100 000 and processed service entry for R100 000 when service done, captured invoice for service entry  R100 000 plus Vat. now i received a credit note for R20 000 plus vat for the s