How to populate a tilelist via my remote xml file?

I have a mysql database set up and have produced it's contents into an xml format via php. Here is the xml data:-
http://www.coolvisiontest.com/getcategories.php
In my app I've set up a http request pointing to this url but I now need to assign this as the data provider of my tilelist so that the categorynames are displayed within the tilelist. How do I edit the dataprovider of the tilelist to show this?
Here's my code:-
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:HTTPService id="getProductCategories" url="http://www.coolvisiontest.com/getcategories.php" useProxy="false"/>
<mx:TileList dataProvider="{getProductCategories}" x="137" y="84"/>
</mx:Application>

I have a mysql database set up and have produced it's contents into an xml format via php. Here is the xml data:-
http://www.coolvisiontest.com/getcategories.php
In my app I've set up a http request pointing to this url but I now need to assign this as the data provider of my tilelist so that the categorynames are displayed within the tilelist. How do I edit the dataprovider of the tilelist to show this?
Here's my code:-
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:HTTPService id="getProductCategories" url="http://www.coolvisiontest.com/getcategories.php" useProxy="false"/>
<mx:TileList dataProvider="{getProductCategories}" x="137" y="84"/>
</mx:Application>

Similar Messages

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • How to get the attribute value of an XML file??

    How to get the attribute value of an XML file??
    For example, how to get name and age attributes?
    <student name="Joe" age="20" />

    What are you using to read the XML file??
    On the assumption of JDOM - www.jdom.org. Something along the lines of:SAXBuilder builder = new SAXBuilder(true);
    Document doc = builder.build(filename);
    Element root = doc.getRootElement();
    List children = root.getChildren();
    Element thisElement = (Element)children.get(n);
    String name = thisElement.getAttributeValue("name")
    try
         int age = Integer.parseInt(thisElement.getAttributeValue("age"));
    catch (Exception ex)
         throw new InvalidElementException("Expected an int.....");
    }Ben

  • How to add a internal dtd to my xml file

    I am using the xml parser for PL/SQL, how can add a internal dtd to my xml file..
    Thanks in advance...

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Sorry, there is not an API to set internal DTD.
    But you can set external DTD by using:
    PROCEDURE setDoctype(doc DOMDocument, root VARCHAR2,sysid VARCHAR2, pubid VARCHAR2)<HR></BLOCKQUOTE>
    Thanks for your replay...
    null

  • How to populate list component via xml file?

    There is a TextArea component that should show the name and
    the description of the item selected in the list component. But I
    dont know how to populate list with external XML and what should be
    the coding in flash as well as what should be written in the XML.
    Please help.

    Here's an xml file listing a couple of brother comedy teams:
    <?xml version="1.0" encoding="UTF-8"?>
    <team>
    <brothers>
    <Marx>
    <name>Groucho</name>
    <name>Chico</name>
    <name>Harpo</name>
    <name>Zeppo</name>
    <name>Gummo</name>
    </Marx>
    <Howard>
    <name>Moe</name>
    <name>Curly</name>
    <name>Shemp</name>
    </Howard>
    </brothers>
    </team>
    Open a new .fla and save it in the same folder as the .xml
    file. Place a List Component on the Stage and name it (in this
    case, "comicTeams_list"). In the first frame write the following
    ActionScript:
    //create XML object and load external xml file
    var broList:XML = new XML();
    broList.ignoreWhite = true;
    broList.onLoad = processList; // this is a function that will
    be written below
    broList.load("populateList.xml");
    function processList(success:Boolean):Void{
    if(success){
    loadList();
    }else{
    trace("Load failure");
    function loadList():Void{
    var broName:String;
    var listEntries =
    broList.firstChild.childNodes[0].childNodes[0].childNodes.length;
    for(var i:Number = 0;i<listEntries;i++){
    broName =
    broList.firstChild.childNodes[0].childNodes[0].childNodes
    .childNodes[0].nodeValue;
    trace(broName);
    comicTeams_list.addItem(broName);
    //to make something happen when you click on a name in the
    List, create a Listener and function
    var broListListener:Object = new Object();
    broListListener.change = someAction; //"someAction" is a
    function to be written shortly
    //add the Listener to the List
    comicTeams_list.addEventListener("change", broListListener);
    function someAction(evtObj:Object):Void{
    var pickedBrother:String = evtObj.target.selectedItem.label;
    //write actions here, referencing pickedBrother variable
    The names of the Marx Brothers will appear in the box.
    This is written in AS2. When you post a question, it's a good
    idea include which version of ActionScript you're using.

  • How to read from and write to remote data file?

    Hi there
    I have two variables that I would like to store in a remote data file which can be accessed by my Flash file. It is for a voting system, so the first variable would be a counter that is incremented each time a user votes, and the second would be the total rating. The average rating would then be calculated from these.
    How would one store, retrieve, and then update these variables from the data file?
    I can create the system within a single Flash file for a single session, but obviously I'd like multiple users opening the file simultaneously to be able to access the data and update it.
    I'm using AS2 in CS3. Any help would be appreciated.

    Right, I've made significant progress since I started this topic. I now have my Flash and php files set up, and the communication between them is working. I'm having difficulty now retaining my variables in the php and updating them for the next session. The script that I have is as follows:
    <?
    $totalRating1 += $_POST['latestRating1'];
    $ratingCount1 ++;
    $averageRating1 = $totalRating1 / $ratingCount1;
    echo "&averageRating=$averageRating1";
    ?>
    The first line receives the variable "latestRating1" from the SWF. The new average rating is calculated and returned to the SWF as "averageRating". When I run it, however, the variables are reset each time. The average rating is always the same as the latest rating. How can I retain the variables so that they are updated and available for the next user?
    Any advice would be appreciated. I am very new to php, and don't have any experience with other scripting languages. I'm using ActionScript2.

  • Using Java, How can I Update, Add, Delete nodes in XML Files.

    Hi,
    I want to store the student record (like Name, Age, school name, total mark etc.,) as nodes in the XMLfile. Also I should able to Update, Add, Delete any nodes (student record) in the XML file. How can I achieve this...using Java
    I am able to read the content of the xml file using xml-parser. But my problem is
    updating the xml file.
    pls suggest some solutions or links with " example source code"
    Thanks :-)

    There are 2 kinds of XML parsers : SAX and DOM. DOM seems to suit your need. You can use JAXP APIs to add, delete or change nodes or attributes.
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html provides contents that would satisfy most of the needs.
    To save a DOM modified XML file use java IO APIs to write to the same file from which it was read using a Document object ( doc.getNodeValue() ).

  • How do i use a flash gallery with xml file

    Hi there....
    I am trying to include a flash banner template i have downloaded into my webpage using dreamweaver CS5.
    the template comes with an XML file with it in which you can reference your own images etc..
    I understand how to inclued the Flash object into my webpage by insert-swf- and then navigating to the .swf file...
    what i am having trouble with is understanding how this refereces the XML file in the download pack as i cant find any references to it in the code??
    I am just getting the grey flash box with no images appearing when i hit play etc..
    sorry if this is a really silly question!!
    mart

    If you are using DW to insert the Flash, that could be the problem.  It is not reliable resource in that respect (my opinion, but a shared one). I normally only use Flash to create the code and copy/paste it into my html page.  Did you get an fla file with the set, and do you have Flash?
    What you should do is test the swf file by itself to make sure it works.   Normally you can link directly to the swf file to check that out.  Just type in the url to the swf file and see if it plays.  There may be some other setup required that maybe an accompanying set of instructions might explain.
    Also, if you have a link to the html file you uploaded, providing it here may help in getting things resolved.

  • How to get ALL validate-errors while insert xml-file into xml_schema_table

    How to get all validate-errors while using insert into xml_schema when having a xml-instance with more then one error inside ?
    Hi,
    I can validate a xml-file by using isSchemaValid() - function to get the validate-status 0 or 1 .
    To get a error-output about the reason I do validate
    the xml-file against xdb-schema, by insert it into schema_table.
    When more than one validate-errors inside the xml-file,
    the exception shows me the first error only.
    How to get all errors at one time ?
    regards
    Norbert
    ... for example like this matter:
    declare
         xmldoc CLOB;
         vStatus varchar
    begin     
    -- ... create xmldoc by using DBMS_XMLGEN ...
    -- validate by using insert ( I do not need insert ;-) )      
         begin
         -- there is the xml_schema in xdb with defaultTable XML_SCHEMA_DEFAULT_TABLE     
         insert into XML_SCHEMA_DEFAULT_TABLE values (xmltype(xmldoc) ) ;
         vStatus := 'XML-Instance is valid ' ;
         exception
         when others then
         -- it's only the first error while parsing the xml-file :     
              vStatus := 'Instance is NOT valid: '||sqlerrm ;
              dbms_output.put_line( vStatus );      
         end ;
    end ;

    If I am not mistaken, the you probably could google this one while using "Steven Feuerstein Validation" or such. I know I have seen a very decent validation / error handling from Steven about this.

  • Contact Form: How do i create a link from an XML file to another domain to read a PHP File

    So i purchased a template from Template Monster and im having a little trouble with the contact form. The server that im uploading it to is a privite server that the company owns. It supports ASP and not PHP. I cant seem to get the ASP form to work so all i want to do it create a link to another one of there servers that supports PHP and have the contact form link to there and read the PHP file (that i will upload to that server) and send the email from there.
    This is the XML that i have to fill in in order to make it work
    Everything in Red is what i needed to fill out in order for the form to work.
    <?xml version="1.0" encoding="utf-8"?>
    <!--
            Please read this information to learn how to set up the contact form integrated
            into the template.
            This readme file explains in details the meaning of the settings that can be
            done in the fcContactFormConfiguration.xml configuration file.
            It is recommended for you to use an XML editor to make changes to this file
             because it’s less possible to make an error in the markup which can cause to
            a not working contact form.
      -->
    <contactFormConfiguration>
        <!--
                An e-mail address which will be used to receive messages from your contact form.
                You can specify several e-mail addresses separating them with a comma.
                For example: [email protected], [email protected], [email protected]
          -->
        <emailTo>[email protected]</emailTo>
        <!--
                A server script type which will process sending e-mails. It depends on your
                hosting and in the current version of the contact form it is allowed to use
                two types:  php (Apache, PHP Hosting); asp (IIS web server, ASP).
          -->
        <serverProcessorType>php</serverProcessorType>
        <!--
                A name of the script file which process sending e-mails on your server (without
                extension). The name contact is used by default.
          -->
        <serverProcessorFileName>contact</serverProcessorFileName>
        <!--
                Set whether to validate only required fields (true/false).  The default value is
                true which means the not required fields of your contact form will not be validated.
                For example if the e-mail field of your form is set as not required (imagine it)
                the form will be processed even if the user types in an incorrect e-mail address.
          -->
        <validateRequiredOnly>false</validateRequiredOnly>
        <!--
                Set whether to submit the form when the Enter key is pressed even if the focus is
                not on the Submit button (true/false).
          -->
        <submitFormOnEnter>false</submitFormOnEnter>
        <!--
                Text showing to the user when the form is submitted without any errors.
          -->
        <messageSentText>Thank you for your message.</messageSentText>
        <!--
                Text showing in case the form is not submitted because of a server error.
          -->
        <messageSentFailedText>Sorry, your message couldn't be sent</messageSentFailedText>
        <!--
                Text your visitor will see while waiting till the processing is over.
          -->
        <formProcessingText>processing...</formProcessingText>
        <!--
                Your SMTP server (for ASP only).
          -->
        <smtpServer>localhost</smtpServer>
        <!--
                Your SMTP port (for ASP only).
          -->
        <smtpPort>25</smtpPort>
        <!--
                Set whether to send the message as a plain text (true) or as HTML (false).
          -->
        <plainText>false</plainText>
        <!--
                ID of the input field (in the structure XML file) to use for the “from: ”
                or email to use instead (for example: [email protected]).
          -->
        <emailFromSource>2</emailFromSource>
        <!--
                Subject of the e-mails that will be sent through this contact form or ID of
                the input field (in the structure XML file) to use for the “subject: ” label
                in your e-mail client.
          -->
        <subjectSource>Contact Form from your site</subjectSource>
        <!--
                Validation error messages that are showing to the user when the form fails to
                validate. The form supports different types of validators. You can change the
                text of the error messages the validators produce here.
                You can use the {LABEL} keyword in these messages. It will replace it with the
                label value of the field where an error occurs.
          -->
        <validationErrorMessages>
            <!--
                    A required field is not filled in.
              -->
            <message type="fieldIsRequired">{LABEL} is required.</message>
            <!--   
                    The specified e-mail address is incorrect.
              -->
            <message type="emailNotValid">{LABEL} - is not valid email address.</message>
            <!--
                    The specified number of characters in a field is less than a required minimum.
              -->
            <message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less than a required minimum.</message>
            <!--
                    The specified string does not match with the regular expression.
              -->
            <message type="reqExpError">{LABEL} - The specified string does not match with the regular expression.</message>
            <!--
                    The specified number is greater than an acceptable biggest number for this field.
              -->
            <message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable biggest number for this field.</message>
            <!--
                    The specified number is lower than an acceptable lowest number for this field.
              -->
            <message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable lowest number for this field.</message>
            <!--
                    The data is not a number.
              -->
            <message type="notANumberError">{LABEL} - The data is not a number.</message>
            <!--
                    The specified number must not be negative.
              -->
            <message type="negativeError">{LABEL} - The specified number must not be negative.</message>
            <!--
                    The minimum number of variants is not selected
              -->
            <message type="minRequirementError">{LABEL} - The minimum number of variants is not selected</message>
            <!--
                    The number of variants selected exceeds the maximum
              -->
            <message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the maximum</message>
            <!--
                    The fields that should be equal do not match
              -->
            <message type="shouldBeEqualError">{LABEL} - values do not match</message>
            <!--
                     The date has wrong format.
              -->
            <message type="dateIsNotValidError">{LABEL} - date has wrong format</message>
        </validationErrorMessages>
    </contactFormConfiguration>
    THIS IS THE ACTUAL CONTACT.PHP Form That i would like to link to.
    <?php
    //-----------------Getting data sent by flash---------------------
    foreach ($_POST as $key => $value){
            if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){
                $mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';
                $mail_body .= ''.stripslashes($value).'<br/>';
    $message = '<html><body>'.$mail_body.'</body></html>'; //  mail body
    //------------if plain text is set to true removing html tags------
    if ($_POST['plain_text']=='true') {
        $message = str_replace('<br/>',"\r\n", $message);
        $message = strip_tags($message);
    } else {
    //----otherwise composing message headers---------------------------
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=windows-1251' . "\r\n";
    //------------setting conf data-------------------------------------
    $to = $_POST['mail_to'];
    $from = $_POST['mail_from'];
    $subject = $_POST['mail_subject'];
    $smtp_server = $_POST['smtp_server'];
    $smtp_port = $_POST['smtp_port'];
    //---------setting header info--------------------------------------
    $headers .= 'From:' .$from;
    if (mail($to, $subject, $message, $headers)){ // sending mail
        print('&mail=1');  //succes
    } else {
        print('&mail=0');//failure
    ?>

    You can open both Muse files at once, copy the content of a page on one site, then paste it into a new page on the other site. You might have to redo some of the page styling.

  • How to create a data connection with dynamic XML file?

    Thanks for all reply first!
    I have formatted the submitted data into an XML file on the server side,this file can be import to PDF form correctly.
    I try to send this XML file to the user to let him can review what he has submitted.
    I guess that I should create a data connection to the XML file so that it can be reviewed by the user.
    But the question is that the XML file is dynamic generated.
    How can i do?
    give me some clus or examples,please.
    thanks,
    Jasper.

    Hi Jasper,
    To show user back the result, you can use PDF instead of XML. You can store the PDF template in server and you can merge XML data with PDF template by Livecycle Form Data Integration service.
    We, as KGC, can generate huge number of Adobe Livecycle forms in small periods. Also we give consultancy on Adobe Livecycle ES products and Adobe Livecyle Designer. In case of any need, do not hesitate to contact us.
    Asiye Günaydın
    Project Consultant
    KGC Consulting Co.
    www.kgc.com.tr

  • How to display data in combo box from xml file.

    Hi All,
            I have the data in xml file.
      <jukebox>
        <song>
            <title>When the Levee Breaks</title>
            <artist>Kansas Joe and Memphis Minnie</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Better Leave that Stuff Alone</title>
            <artist>Will Shade</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
        <song>
            <title>Walk Right In</title>
            <artist>Cannon's Jug Stompers</artist>
            <url>delhi601(www.songs.pk).mp3</url>
        </song>
    </jukebox>
    and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
    Can any one help me.
    thanks
    Raghu.

    Raghuvasa,
    Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
    combo.dataProvider = jukebox.song.url
    or as a shortcut
    combo.dataProvider = jukebox.descendants("url")
    The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
    Richard

  • For loop and xml - how to point the right content in a XML file with a dynamically created button?

    Hi Everybody,
    as my first experience in AS3 I'm bulding a photo multigallery. In that gallery I have some buttons, each one pointing to its respective set of images.
    Each button is created with the for loop, that picks the information from a XML file. From this XML I get the text of the button, the position etc. What I did with some sucess. But there is a scary problem: I don't know how to make each button load the respective and unique set of images.
    I've tryied several different methods, with no effect, to make each loop to give to each button an unique identity to load the respective set of images.
    I imagine that the solution pass by the use of arrays. I wrote some code, and I guess that I'm almost there (but not sure). Here is my AS3 code until now:
    // CREATE MENU CONTAINER //
    var menuContainer:MovieClip = new MovieClip();
    menuContainer.x=10;
    menuContainer.y=300;
    addChild(menuContainer);
    // CREATE IMAGES CONTAINER //
    var imagesContainer:MovieClip = new MovieClip();
    imagesContainer.x=10;
    imagesContainer.y=10;
    addChild(imagesContainer);
    //// LOAD XML ////
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
    xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
    var xml:XML;
    function whenLoaded(evt:Event):void {
         xml=new XML(evt.target.data);
         var mySetsList:XMLList=xml.children();
         //// MENU BUTTONS ////
         // CREATE ARRAYS //
         var totalArray:Array = new Array();
         var setNodesArray:Array = new Array();
         var setNamesArray:Array = new Array();
         // POSITIONING BUTTONS INSIDE MENU CONTAINER//
         var rowsQuantity:Number=3;
         var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
         var cellWidth:Number=160;
         // CREATE BUTTONS //
         for (var i:int=0; i< mySetsList.length(); i++) {
              var newSetButtonMC:setButtonMC=new setButtonMC();
              //what do I do here to make it works? To give each button created a unique id.
              setNodesArray.push(i);
              //trace(setNodesArray);
              var imageNodesArray:Array = new Array();
              for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
                   imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
              totalArray.push(imageNodesArray);
              newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
              newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
              var cellX:Number=Math.floor(i/rowsQuantity);
              var cellY:Number=i%rowsQuantity;
              newSetButtonMC.x=cellX*cellWidth;
              newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
              newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
              menuContainer.addChild(newSetButtonMC);
         totalArray.push(setNodesArray);
         //// MENU BUTTONS ACTIONS ////
         function onClick(mevt:MouseEvent):void {
              trace(totalArray [0][0]);
              trace(totalArray [0][0]);
              // in the line above I achieved some success loading a specific info from XML.
              // but I don't know what to do with it.
              //what do I do here? To make each button to load its own node from XML.
    Here is my XML:
    <GALERIA galeriaTitle="galeria 01">
      <IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
    </GALERIA>
    <GALERIA galeriaTitle="galeria 02">
      <IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
    </GALERIA>
    Thanks everyone . ABSTRATO

    you can assign each newSetButtonMC and ivar property that points to its i value or, even easier:
    // CREATE MENU CONTAINER //
    var menuContainer:MovieClip = new MovieClip();
    menuContainer.x=10;
    menuContainer.y=300;
    addChild(menuContainer);
    // CREATE IMAGES CONTAINER //
    var imagesContainer:MovieClip = new MovieClip();
    imagesContainer.x=10;
    imagesContainer.y=10;
    addChild(imagesContainer);
    //// LOAD XML ////
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
    xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
    var xml:XML;
    function whenLoaded(evt:Event):void {
         xml=new XML(evt.target.data);
         var mySetsList:XMLList=xml.children();
         //// MENU BUTTONS ////
         // CREATE ARRAYS //
         var totalArray:Array = new Array();
         var setNodesArray:Array = new Array();
         var setNamesArray:Array = new Array();
         // POSITIONING BUTTONS INSIDE MENU CONTAINER//
         var rowsQuantity:Number=3;
         var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
         var cellWidth:Number=160;
         // CREATE BUTTONS //
         for (var i:int=0; i< mySetsList.length(); i++) {
              var newSetButtonMC:setButtonMC=new setButtonMC();
              //what do I do here to make it works? To give each button created a unique id.
              setNodesArray.push(i);
              //trace(setNodesArray);
              var imageNodesArray:Array = new Array();
              for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
                   imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
             nextSetButtonMC.imageArray = imageNodesArray;
              //totalArray.push(imageNodesArray);
              newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
              newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
              var cellX:Number=Math.floor(i/rowsQuantity);
              var cellY:Number=i%rowsQuantity;
              newSetButtonMC.x=cellX*cellWidth;
              newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
              newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
              menuContainer.addChild(newSetButtonMC);
         totalArray.push(setNodesArray);
         //// MENU BUTTONS ACTIONS ////
         function onClick(mevt:MouseEvent):void {
              var mc:setButtonMC=setButtonMC(mevt.currentTarget);
    for(i=0;i<mc.imageArray.length;i++){
    trace(mc.imageArray[i]);
    Here is my XML:
    <GALERIA galeriaTitle="galeria 01">
      <IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
    </GALERIA>
    <GALERIA galeriaTitle="galeria 02">
      <IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
    </GALERIA>
    Thanks everyone . ABSTRATO

  • OIM Reporting: How to pass a dynamic parameter in the xml file

    Hi,
    I am generating a custom report in OIM. My stored procedure is ready and I am getting the required data when I query the database. However,while displaying it through the xml file, I need to filter the fetched data by group name. The glitch present here is that the group name is dependent on the resource selected and so the group parameter is dynamic. How can I pass this dynamic group parameter in the xml file to filter the data. Which attributes are to be used. Can anyone please help me out regarding this?
    Thanks in Advance,
    SK

    The OOTB OIM reporting mechanism does not support dependant LOVs, which is
    what you are asking for.

  • How to get the real path of the xml file

    I have a java application
    following is the package structure
    com>>gts>>xml
    having file---------> MyXML.xml
    com>>gts>>java
    having java program to read the file
    Problem is if I use File file = new File("..\\xml\\MyXML.xml");
    java.io.FileNotFoundException: E:\LEARNING_WORK_SPACE\JavaXml\..\xml\MyXml.xml (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
    How do I get the real path of the xml file.
    Edited by: shashiwagh on Jan 29, 2010 11:46 AM

    Hi,
    if your XML file is inside a package you can easily get it from the classloader.
    Note that your application maybe packaged inside a jar so it is not safe to use java.io.File for this purpose.
    You have an xml file in :
    com/gts/xml/MyXML.xml
    in a class of the same module (that will packaged in the same jar) for example com.gts.java.XmlLoader :
    // To get the stream :
    InputStream is = this.getClass().getResourceAsStream("/com/gts/xml/MyXML.xml");
    // Or the URL :
    URL xml = this.getClass().getResource("/com/gts/xml/MyXML.xml");Hope it helps.

Maybe you are looking for