XMLList to External XML File

Hi All,
I'm new to Flex, but I've been impressed with it so far. I
was able to create a simple app, where things like navigation trees
and table data were populated based on XML stored inside mx:XMLList
tags inside the main document. In order to clean things up, I
thought I'd move the data into external XML files. I copied the
data out to the files, and verified the data always had a single
top-level node. I then noted that mx:XMLList doesn't support the
'source' attribute, so converted to using mx:XML tags inside the
application mxml. The application now compiles, but entirety of the
XML hierarchy displays as a single node, instead of being parsed
into tree nodes. Any idea what I'm missing here? And thanks in
advance for going easy on the noob. ;-)
- Josh

Spoke too soon. Looks like that top node thing is right, as
it's only passing in the first node from each xml datasource. It
must've been doing that before, but since the top-node didn't have
a label, it displayed all the children as the label.
So by adding the top-level node to the XML, my guess is that
when I call my data from the dataProvider, I'll have to add
something to bypass this extra layer of hierarchy, right?
Currently my app code has:
<mx:XML id="deviceTree" source="deviceTree.xml" />
<snip/>
<mx:Tree dataProvider="{deviceTree}" />
and my XML (deviceTree.xml) with the new added top node is
now:
<?xml version="1.0" encoding="utf-8"?>
<devices>
<node label="Foo">
<node label="Foo1" />
<node label="Foo2" />
</node>
<node label="Bar">
<node label="Bar1" />
<node label="Bar2" />
</node>
</devices>
I tried changing the dataProvider to {deviceTree.devices} but
to no avail. Can someone throw me a line?

Similar Messages

  • How can I set connection to external XML file with Dreamweaver to buiild AIR app?

    Hello,
    I try to do simple AIR app in dreamweaver. It's not problem
    to use static data. But I'd like to use dynamic data from external
    XML file. I try to use Spry and evrything works fine in web browser
    but i have problem with loading external XML data into my app in
    AIR. Can I simply transform my spry based html app into AIR?
    What should I add to do this?
    Pawel

    Daniel Lichtenwald wrote:
    What are the requirements and steps for arranging to receive this large file using File Transfer Protocol (FTP)?
    Usually, we don't speak of "receive" when using FTP, since the file is transferred from server to client, so it's more of a case of "download".
    At your end, it's simple. You use an FTP client; under SL, that includes Finder and Safari, so you don't even need to get any additional software.
    At the other end, it's more complicated; the 'sender' must set up an FTP server on his machine.
    Alternatively, you can set up your own Mac as an FTP server, and have the 'sender' connect to you with an FTP client and upload the file; but, if your Mac lives behind a router, then you have more work to do with the router settings.
    That's why it's much easier to use the file sharing services mentioned above -- if they are available in both sender's and receiver's locations. (Keep in mind that some countries block access to all those mentioned -- except perhaps <www.transfer.ro>, of which I know absolutely nothing.)

  • Import external xml file in PDF using Livecycle

    I require sending some values in main xml file from the external xml file during sending mail on button click. Doing so, I want to read values from external file into a hidden field or send the external xml/text file as an attachment.
    1. Is there any feature in live cycle to attach multiple xml/text files in mail using button click?
    2. Is there any way to read an external xml file to pre-populate a textbox using javascript?
    Kindly help me to find out the solution.
    Thanks in advance
    Vikram Kumar

    Hi,
    1) You can do this with a script. But this script works only with the Acrobat Pro not with the Adobe Reader!!
    2) Sure.
    You open your form.
    Go to File | Form Properties |  Preview | then choose your xml-file
    Then you have to got to the textobject | mark this | go to "Object" | "Binding"
    Here you can bind the field: $record.PRINTJOB.PMSDATA.ObjectNameXML (You have to adapt this in the path in your XML to the field in the XML)
    If you make a preview you will see the value of the XML in your textfield.
    You can also script the databinding. You have to go to the initalize.event and write:
    this.rawValue = xfa.record.PathToYourFieldInYourXML.ObjectNameXML.value;
    Hope it will helps you,
    Mandy

  • External XML files in Flash iPhone apps

    Hi everyone. I know that apple has loosened up on what is and isn't allowed on the app store these days, such as flash. I was thinking of writing an app that would call upon a web based xml file to call up pictures to display in the iPhone.
    I know Apple doesn't allow apps that call upon external scripts but it's not an executable script, its a list of images and where they are stored. Does anybody have any input on whether Apple may have a problem with this?
    Cheers

    don't know.
    I'm not sure of the differences between actionscript in flash and javascript in the browser but you could call for an XML file to be sent as json data from the script if accessing external XML files directly is not allowed.
    Problem is that XML can contain anything you want it too... it could contain a script itself.

  • Testing SWF with external XML file, strange problem.

    Hi!
    My problem started after migration to 2.01. But I think it's
    not version problem.
    I have old project which uses external XML files ("
    http://www.mydomain.com/myxml.xml").
    When I teste project in "bin" folder it works perfect and SWF
    import data from XML.
    I created new Flex project and copied all scripts from old
    one. And my new app can't read external XML!!! (tested in "bin"
    folder):
    *** Security Sandbox Violation ***
    Connection to xmlURL halted - not permitted from
    file:///C:/myproject/bin/myproject-debug.swf
    BUT when I copy my new SWF to the old project "bin" folder
    then it WORKS! Strange!
    I found in Help "The Global Flash Player Trust directory" and
    I checked files: "flexbuilder.cfg", "flexbuilder.fbr" there are all
    my project paths (old and new).
    Thanks for help!
    newman

    You should your homework with Google and other search engines
    better ;)
    http://www.robrusher.com/1/2006/08/Flex-2-Error-with-XML.cfm

  • How to import external XML file

    Hello guys:
    From this demo
    http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/#section2
    we know how to use a intrernal XML document. I know there are
    several way to load a external XML like:
    <mx:HTTPService
    id="loadTest"
    useProxy="false"
    showBusyCursor="true"
    resultFormat="xml"
    url="data/login.xml"
    />
    What I want to know is whether I could load a XML file
    directly, not use HTTPService and send. For a instance:
    [Bindable]
    private var login:XML = ("data/login.xml");
    or something like that. And then I could use login.user or
    login. pass .
    Now seems it is easy to control a intrernal XML data. I want
    to import a external XML file and use it like a intrernal XML.
    Thanks a lot

    You only have 2 choices: include the XML as part of the SWF
    using <mx:XML source="filename.xml" /> or load it dynamically
    using a data service such as HTTPService.

  • Populating Tree with External XML File

    I want to use external files for populating Flex 3
    components. I have been successful using code very similar to that
    below for a data grid & for a combo box, but it won't work for
    a tree. Can you determine wh?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:HTTPService id="dp_Tree1" url="Tree1.xml" />
    <mx:Tree dataProvider="{dp_Tree1.lastResult.root.node}"
    creationComplete="dp_Tree1.send()" width="333"/>
    </mx:WindowedApplication>
    It's not working & I can't determine why. Attached is my
    xml file that I tested it with.

    Thanks a bunch folks, but my intent is to have as little code
    as possible. I want to help people who are not coders create
    designs using external xml files to populate controls. I was able
    to create very simple code with just two lines to populate a
    DataGrid from an external xml file:
    <mx:HTTPService id="dp_DataGrid1" url="DataGrid1.xml"
    />
    <mx:DataGrid
    dataProvider="{dp_DataGrid1.lastResult.component.rows}"
    creationComplete="dp_DataGrid1.send()" />
    And just two lines for a ComboBox:
    <mx:HTTPService id="dp_ComboBox1" url="ComboBox1.xml"
    />
    <mx:ComboBox
    dataProvider="{dp_ComboBox1.lastResult.component.rows}"
    creationComplete="dp_ComboBox1.send()" />
    Isn't it possible to populate a tree with two lines like as
    it is with a DataGrid & ComboBox?

  • How to read an external XML file in a indesign Plugin?

    Hi All,
    Can you please guide in reading an external XML file in a indesign Plugin in MAC system. I am an windows user.We are using this file for reading some inputs.
    Thanks,
    Daniel

    Hello Daniel,
    I am uncertain about the actual question. If you are developing a plug-in or otherwise interfacing with the guts of ID, I suggest asking the question in the SDK forum:
    InDesign SDK Forum
    Otherwise, what is it you are wanting to know concerning importing XML into InDesign?
    Mike

  • Media files prevent Flash from fully loading external XML file

    Im trying to debug a flash widget we created, and it loads
    fine on the 20 odd computers we tested on EXCEPT for one computer
    where, the application doesn't load an external XML file that calls
    for 3 small mp3 files and a FLV file to load as well.
    In a debugger, we noticed that when it tried to load these
    mp3 files it was getting a Forbidden access message. The FLV just
    prevents the FLV player from showing up at all (not even the skin).
    Can anyone figure out why, that it would work over all the
    other computers and NOT the one? On that person's computer, we
    tried it in IE, Firefox, even Chrome and the application doesn't
    load. We even cleared the cache, did a hard refresh and still
    nothing.
    However, the other computers work just fine.
    ALL the computers have the latest Flash software installed.
    What could cause this problem?

    Actually what worked was removing 'xmldoc' from the php script. So $data =$GLOBALS["HTTP_RAW_POST_DATA"]; instead of $data = xmldoc($GLOBALS["HTTP_RAW_POST_DATA"]);
    Couldn't find anything about 'xmldoc'. Is it used for anything in php?
    Anyway, the loading error went away, but then I got into problems with getting the return echoed values back. The textfield stayed empty even when saving the data.txt file worked.
    I then placed the <stuff> tags between <root> tags and then flash got the sentences between the <stuff> tags back. Why does Flash need the returned xml output to be between <root> tags for it to see the content between the <stuff> tags? So why do I need to use echo("<root><stuff>Server unable to create file.</stuff></root>"); instead of cho("<stuff>Server unable to create file.</stuff>");?

  • Help Required on Reading an External XML file in flex

    Hi Experts
    I want some help regarding flex.
    I want to read an external xml file in flex and want to show
    different datas in different components
    So bacically i need what is the procedure to call an external
    xml file and the procedure to catch the value of the xml tags and
    the option (options means ex: "id" or "type inside" "row" tag ) in
    side the xml file.
    Here is My xml file named "skn_organ.xml"
    <?xml version="1.0" encoding="UTF-8"?>
    <slide>
    <r>7</r>
    <c>8</c>
    <row id="A01" type="g">
    <organ>Skn</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A02" type="g">
    <organ>Brt</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A03" type="g">
    <organ>Spl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A04" type="g">
    <organ>Lnode</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A05" type="g">
    <organ>Ske</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A06" type="g">
    <organ>Lun</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A07" type="g">
    <organ>Sgl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A08" type="g">
    <organ>Liv</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B01" type="g">
    <organ>Gal</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B02" type="g">
    <organ>Pan</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B03" type="g">
    <organ>Ton</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B04" type="g">
    <organ>Eso</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B05" type="g">
    <organ>Sto</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B06" type="g">
    <organ>Sto</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B07" type="g">
    <organ>Sbl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B08" type="g">
    <organ>Col</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C01" type="g">
    <organ>Skn</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C02" type="g">
    <organ>Brt</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C03" type="g">
    <organ>Spl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C04" type="g">
    <organ>Lnode</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C05" type="g">
    <organ>Ske</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C06" type="g">
    <organ>Lun</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C07" type="g">
    <organ>Sgl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C08" type="g">
    <organ>Liv</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D01" type="g">
    <organ>Gal</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D02" type="g">
    <organ>Pan</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D03" type="g">
    <organ>Ton</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    </slide>

    Hi sanjivsutar,
    Put your xml file under folder "assets", the application demo
    is as following
    ====================================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    initialize="init()">
    <mx:Script>
    <![CDATA[
    private var mainXML:XML;
    private var loader:URLLoader;
    private function init():void {
    loader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, onComplete);
    loader.load(new URLRequest('assets/skn_organ.xml'));
    private function onComplete(evt:Event):void {
    mainXML = new XML(loader.data)
    out.text += "xml loaded, using E4X syntax: \n\n";
    out.text += "Row 1: "+mainXML.row[0]+"\n"
    out.text += "Row 6: organ = "+mainXML.row[5].organ+"\n"
    out.text += "Row(id='D02'): link =
    "+mainXML.row.(@id=="D02").link+"\n"
    ]]>
    </mx:Script>
    <mx:TextArea id="out" width="400" height="300"/>
    </mx:Application>
    ======================================================================
    Jeffrey

  • How to insert External XML file content into XMLTYPE through Pro*c

    Could any one sugest me how to insert a external XML file content into Db
    into XMLTYPE datatype through Pro*c program.
    Thanks for any help...... who has done this
    Ghanta Tagore

    Hi
    After some good fight of 3 days, I have done it through Pro*c
    This is the way to handle this
    Buffer-->Temporary Clob-->XMLTYPE(using CreateXml)
    Pasting my piece o code to do this
    ===============
    OCIClobLocator *license_txt;
    varchar h_ttt[1024] = {'\0'};
    ub4 amt;
    int i;
    EXEC SQL ALLOCATE :license_txt;
    EXEC SQL LOB CREATE TEMPORARY :license_txt ;
    GetName(name); /*Gets Name to insert into name column in License Table*/
    for(i=0; i<4;i++)
    GetXMLL((char *)h_ttt.arr); /*Gets a string value of XML into this example*/
    /*<Tagore>Is From TCS Delhi</Tagore>*/
    /*This can be changed to get buffer from FILE */
    h_ttt.len = strlen((char *)h_ttt.arr);
    amt = sizeof(char) * h_ttt.len ;
    EXEC SQL LOB WRITE APPEND :amt FROM :h_ttt INTO :license_txt;
    EXEC SQL
    INSERT INTO license_table VALUES (:sss, :name, sys.xmltype.createXML(:license_txt))
    ================
    Thanks For ur Help
    Tagore Ghanta

  • Firefox flash plugin not loading external xml file?

    I have a Flash based website that uses an external xml file
    to load the interface and navigation. When I view the site in
    Firefox it never seems to load the xml file therefore the interface
    doesn't load.
    Any ideas?

    Hi,
    I have followed your instructions and could able to get it working for firefox. The sameway i tried with mozilla, but not working. This time, I didnt see any errors but it is not working as expected (no animations / images displayed)
    So could you please help me.
    My system config. is X86 Solaris 5.10.
    bash-3.00# pwd
    /usr/sfw/lib/mozilla/plugins
    bash-3.00# elfdump -e libflashplayer.so
    ELF Header
      ei_magic:   { 0x7f, E, L, F }
      ei_class:   ELFCLASS32          ei_data:      ELFDATA2LSB
      e_machine:  EM_386              e_version:    EV_CURRENT
      e_type:     ET_DYN
      e_flags:                     0
      e_entry:                  0x94  e_ehsize:     52  e_shstrndx:   37
      e_shoff:              0x7fb4ac  e_shentsize:  40  e_shnum:      39
      e_phoff:                  0x34  e_phentsize:  32  e_phnum:       3Thanks
    Ram.

  • Insert SWF that calls external XML files and images

    Hi
    I am using Acrobat XI Pro on a Windows 7 system.
    I have a PDF in which I have an SWF file. This SWF file contains text content that is called from an XML file and also some images that is called externally. I have added the folder that contains the XML file and the images by right-clicking the SWF > Properties > Resources > Add Directory. However, none of the content is loading.
    I have tried adding the images and xml file separately as well. Even that did not work.
    What could be wrong? Please advise.
    Sreekanth

    Debugging Flash content in a PDF from the Flash Pro or Flex editor is possible, but it's complicated (you need to juggle about with the SDK to load a special Acrobat plugin). If you're creating these SWFs yourself, the fastest way to debug is to add a bunch of ActionScript calls that report to Acrobat's console to tell you what's going on. Use ActionScript's externalInterface.call() and the Acrobat JS console.println() functions, just like if you were talking to JavaScript in a web page.
    Rich media resources cannot be imported globally in Acrobat. In theory it's possible (the ISO standard allows XObject references to shared assets) but there's no authoring tool.

  • Reading external xml files from a jar

    Hi,
    I am trying to read an xml file from a jar (which is not present inside the jar ) .
    I am passing the file name as a string (like C:/folder/filename) to the SAXBuilder but it throwing
    unknown protocol: c error.
    i tried using an url , tried using a relative path but to no use.
    Need help in this regard urgently.
    TIA,
    Regards,
    Harsha

    Hi,
    Actually, my application needs to read two xml files , parse it, perform some operation and write
    the result to an output file.
    The names of the two xml files i mentioned, are specified in a properties file as absolute paths. (I even tried converting them to URIs)
    The xml files are in the same directory as the jar ( i dont know if it should matter as i am giving the absolute path).
    The main class reads the names of the files and passes the names as strings to the SAXBuilder.
    This is where i am getting an exception.
    Going by what you said, is it not possible for a java class to read a fie outside of the jar ? Is there no way to do this ? And right now i am not sure of how to go about this or if there's any work around . Any help would be appreciated.
    Kindly reply at the earliest
    TIA,
    Harsha

  • Modifying value in external xml file

    Hi,
    I've been searching around for some time and haven't been able to find the solution to what I think should be a simple problem.
    I have an xml file that I need to change the value of an item from False to True.
    The structure of the file is:
    <data>
    <system-page>
    <id>1</id>
    <other fields></other fields>
    <dynamic-metadata>
         <name>publish</name>
         <name>yes</name>
    </dynamic-metadata>
    <dynamic-metadata>
         <name>frontpage</name>
         <name>no</name>
    </dynamic-metadata>
    </system-page>
    <!---tons more system pages--->
    </data>
    I am able to read the file and get to the exact line as such:
    <cffile action="read" file="E:\test.xml" variable="newsFile" charset="utf-8"/>
    <cfset newsXML=XmlParse(newsFile)/>
    <cfset arrItemNodes = XmlSearch(newsFile,"/data/system-page[@id='1']/dynamic-metadata[name='frontpage']/value")/>  
    I'm not sure how to edit and save the value. I imaging it's something like this:
    <cfset arrItemNodes[1].xmlText = 'True'>
    But is there anyway to save this information in the xml file at the right location?
    Any help is appreciated.

    Is it because I'm sending in an array?
    Yes.  If you check the documentation  linked above, it explains the function expects an "a simple value such as an integer, a binary object, or an XML document". An array is not any of those types. So that is why you are getting the error. You need to pass in the whole xml document.
    I don't see how the write action would know where to embed my edit in the XML file.
    Correct. It would not know. You need to write the entire xml document back to the file (ie xmlText).
    Not sure which CF version, I think 8? Obviously I'm new to CF.
    Welcome to CF. You can find out your server version by cfdumping the SERVER scope.  Cfdump is a great debugging tool.  Also, if you are new be sure to bookmark the online documentation.  It is my first stop when I have questions about a function or tag. Still use it most every day :-)
    ie      <cfdump var="#server#">
    Message was edited by: -==cfSearching==-

Maybe you are looking for

  • Excise modvat accounts not defined for GRPO transaction and 58 Excise group

    Hi Experts, When i am doing Goods receipts for Depot for Subcontracting i am getting this error message .Excise modvat accounts not defined for GRPO transaction and  Excise group. For Depot no modvat. is there any configuration setting for depot. Ple

  • SharePoint Online content effective permissions DO NOT match check permissions

    I have a document list in the main site. The contents are sensitive so inheritance has been broken. Access to the list is via two AD groups: ADGroupEdit and ADGroupRead The list contains several documents. I have selected a document and gone to the a

  • IPOD mini - Gen 2

    I dropped my mini on the cement while running today and now it is frozen. Could I have broken it? What steps should I take?

  • Query for Stock Tranfer Mov-311

    Dear Experts, I want to make a query to know value of stock transfer from one storage location to another on certain date or from x date to y date. In MB51 there is no value appears, as there is no financial transaction. I am preparing query using SQ

  • Huge slide shows in iMovie when imported from iPhoto.

         Every year I do a family slide show of between 250-300 slides. In the past, I've created the show in iMovie. This year, I did it in iPhoto. I wanted to put a title at the front, and iMovie has some great editing features for this. I exported the