External XML file of a chart

I'm new to Flex, but using samples and documentation, I was able to create a simple chart that uses an external xml file for the data source is.

I'm not sure how to get to the next step, i.e.:
Having the table listening to all the changes in the xml file and update running.

Can someone point me samples or documents that can help out me?

Thank you

source = 'path' is a * compile time * operation, so the XML is in fact embedded in the swf file.

Loading the runtime, then use HTTPService.

In addition, do not use mx: Model and if you are using HTTPService, be sure to set resultFormat = "e4x".

Search the archives if you want to know why and read more details and examples.

Tracy

Tags: Flex

Similar Questions

  • Connection to the external xml file

    How to use an external xml file as a data source for my LiveCycle form?

    I have a xml file on my server which is updated daily by a script. My LiveCycle form is on the server and can be pushed to the client by the click of a button on a web page or similar. Is it possible to have the LiveCycle form refresh its data before being sent to the client, or every day?

    I thought that the burden of form, a JavaScript function could check if the form is on the server, or check if the xml file is there, and if this is the case, update itself, else do nothing.

    I prefer to keep the xml file and the distinct shape that other applications and do scripts use xml file.

    Thank you.

    (1) if the form is used internally on the same network (ie: the xml file is still available over the network to your th) form questionable local files, but it requires advanced script.

    I did it with network drives shared tho. -If you do, I use the two solution

    (2) assuming you are using LC Reader Extensions as well as the form is "all over", not always on the network starting.

    -Expose the XML file through a Web service (if it is not sensitive data)

    -Get the form to query the Web service

    (3) but if you have installed with LiveCycle Forms.

    Use the readXML and how to bind the XML with the form.

  • XMLList to the external XML file

    Hi all

    I'm new to Flex, but I was impressed with it so far. I was able to create a simple, where things application like navigation trees and the data in the table were populated based on XML stored in tags mx:XMLList inside the main document. To clean things up, I thought that I would like to move the data in external XML files. I copied the data files and verified that the data has always been a single top-level node. Then, noted that mx:XMLList does not support the attribute 'source', so I converted to the use of mx:XML within the application mxml tags. Compiles the application now, but all of the XML hierarchy displayed in the form of a single node, instead of being analyzed in the tree nodes. No idea what I'm missing here? And thanks in advance for the noob easy going. ;-)

    -Josh

    Yet once, answered myself for posterity.

    For the tree data, the top node is implied, so I just had to change the dataProvider to {deviceTree.node}. For the data in the table, it was a little more difficult, where rather to link using a tag, I rather linked to it as a and then created a where the source is specified as the {[id XML]. [node]}. (once again the top node was already implicit)

  • Write in an external xml file

    OK, so ive been reading on xml and found theres this big thing appeal. appendChild(). that let your add a node to an xml file.

    Here's the catch, I can write in an external xml file, without the need to load it, DIRECTLY through flex?

    or I have to use some php i.e. backend


    Thanks heaps!

    ojk007

    The Flash Player, when it is hosted by a browser, severely limits access to the resources of the host computer. In other words, you cannot read and write files. If the XML file resides on the server, then you can use the code server-side (e.g. PHP) and edit the file, or you can load the XML file into your Flex application on the client computer, change it, then refer to something that can write the file.

  • Polish fonts - ISO 8859-2 (Latin 2) - from the external xml file

    Hello

    I need to import the Polish text in my flashapplication. I load text from an external xml file.
    so far everything I try is unable to display special characters.

    When I encode the text, it works, but it's no choice...


    more than two things: I have to dynamically create the textfield (createTextField();), and the police must be incorporated.

    can someone tell me the solution of this problem?
    any help is appreciated!

    Thank you
    Marcin

    Hello

    here a solution that worked for me:
    I just had to change the language and location settings in windows and flash would take the right code of basic police...

  • Fill the tree with complex external XML file control

    Hi all. I've been combing through forums for two days and have not been able to find a solution to my problem. I'm trying to populate a control of the tree with an external xml file, but the xml file is not a simple. It is complex, and I don't know how to get the tree to display these data. I have attached the code. Can someone take a look and let me know how I could get this to work? Thank you!

    What does not work?

    Complexity of the XML is not, in itself, an issue for the tree.

    Also, I recommend using straight XML, unless specifically, you need Collection features.

    Tracy

  • Problem with loading multiple external xml files

    I have a table named 'source', which consists of names of files external xml, the content of which I'm loading in another table called 'content '. I tried with the following text:

    ----------------------------------------------------------------------------------------
    for (i = 0; i < source.length; i ++) {}
    XML_URL = "' http://localhost/temp/ ' + source ;"
    myXMLURL = new URLRequest (XML_URL);
    myLoader = new URLLoader (myXMLURL);
    myLoader.addEventListener (Event.COMPLETE, xmlLoaded);
    }

    function xmlLoaded(evt:Event):void {}
    Content.push (myLoader.Data);
    }
    ---------------------------------------------------------------------------------------

    The problem is that in this way, I get that content of the last xml file and other items ' content ' are 'undefined '. Anyone know the solution to this problem or maybe another way to do this?

    Thanks in advance

    I tested the following with two xml files in the same folder (I would try the same thing) and put their names in the table source. Create two dummy xml for the test files.
    Here is my exact code (I've changed, I have one because it's italicized here in the forums):

    var content: Array = new Array();
    var source: Array = new Array ("media1.xml", "media2.xml");
    for (var a source) {}
    var XML_URL = ' "+ source [a];
    var myXMLURL = new URLRequest (XML_URL);
    var myLoader = new URLLoader ();
    myLoader.addEventListener (Event.COMPLETE, xmlLoaded);
    myLoader.load (myXMLURL);
    }

    function xmlLoaded(evt:Event):void {}
    Content.push (evt. Target.Data);
    if(Content.Length ==source.) Length)
    TR();
    }

    function tr() {}
    trace (content);
    }

  • Loading data from the external XML file

    Hello people!

    I have a XML file on my server, updated by cron every 10 minutes and I want to load data to my webworks her application, but the jquery ajax function do not support the folded areas. So here's my question - how should this information? Can I somehow download this file and then use ajax?

    Welcome!

    in your config.xml file, add an authorization to access your server:

    subdomains of http://www.yourserver.com"="true"/ >

    This will get by cross-origin issues.

  • Change the value in the external xml file

    Hello

    I searched around for a while and have not been able to find the solution to what I think should be a simple problem.

    I have an xml file I need to change the value from False to True.

    The structure of the file is:

    < data >

    System < pages >

    < id > 1 < /ID >

    < other fields > < / other areas >

    < dynamic metadata >

    < name > publish < / name >

    Yes < name > < / name >

    < / dynamic metadata >

    < dynamic metadata >

    FrontPage < name > < / 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 don't know how to edit and save the value. I Imaging it is something like this:

    <cfset arrItemNodes[1].xmlText = 'True'>
    


    But is there anyway to record this information in the xml file in the right place?

    Any help is appreciated.

    Haha. Well, if you need to do in the future, now you know how ;-)

    See you soon

  • list - restrictive entry visibility and external xml file in the drop-down list

    The question applies to the OPA 10.1, but if a solution requires a version more recent OPA (e.g., 12.1) we can update so please let me know what version your answer applies to.

    I have a series of tabs of a spreadsheet Excel that map different categories on each other and I want to implement this OPA so that there are six screens with drop-down lists and visible elements two on-screen menu will depend on the selected item in the display 1. list to display 3 items will depend on the selected item in the screen 2, which depends on the item selected on the screen 1, etc..

    For example,.

    1 screen can be States:

    Maryland

    Virginia

    New York City

    Georgia

    ...

    2 screen could then be counties: assuming that Virginia has been selected...

    Accomack

    Albemarle

    Alleghany

    ...

    3 screen could be cities: assuming that Accomack is selected...

    Exmore

    Parksley

    ...

    Basically I have large spreadsheet list of lists with items (one list a 2040 pieces) and so I can't manually enter easily list items.  I would like to 'specify the name of the list' and have the OPA to use an xml list (easily created my spreadsheet), but the OPA Help menu says "NOTE: this implementation of the xml list does not support default values or visibility...» "So it seems that I won't be able to make invisible inapplicable list items.  So, to use the fictitious example above, if I chose the State of Maryland, I will not applicable to Virginia or any other State counties, but Maryland is visible; Yet, all counties in the country should be included in the list in the first place.

    If someone knows a solution or another solution to this problem (other than creating custom functions) so please let me know.

    "Out of the box' for 10.1 you can try the following:

    Have simply a separate list for each of the sub-components. He can do even a little painful, but you have not at least custom functions or custom controls.

    On the first screen you have the attribute collection the State using the list of States (provided via xml).

    On the second screen you have the County collection attribute - but repeated 50 times - and then use visibility to show/hide the template you want (which then has the correct xml for the counties in the State).

    On the third screen you have your attribute for the city (once again the same attribute for each list) but isn't there it gets a little mean to 50 times counties in the State.

    In terms of writing that required visibility rules that you can probably leverage Excel to do much of the building of the rule for you to lists (remembering that the compiler takes that you as the user see in Excel, not the function that sees Excel)- so there is not a lot of extra work in the perspective of rules.

    The sticking point will simply put all of these attributes and binds the attribute visibility for the right control (and right xml).

    Proceed with caution (extreme!), but... If you're already Automation to create the XML lists from Excel, then you might want to automate the creation of xml screen. But be very careful. I've seen some projects that have used automatically generated screens and they did the job of the ok - but certainly a warning any time major health you do not use OPM to generate a component of OPM.

    Then... it is possible to do it manually - but you probably want to get involved some automation.

  • View of dynamic text in an xml file

    I'm looking to display dynamic text in an external xml file. When I trace for the variable, all is well in the output window. But the text does not appear in the published movie.

    Here is my current code:

    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load (new URLRequest ("AskAnExpert.xml"));
    myLoader.addEventListener (Event.COMPLETE, processXML);
    function processXML(e:Event):void {}
    myXML = new XML (e.target.data);

    var topic1:String = myXML.TOPIC [0]. FIELD_NAME;

    trace (topic1)

    };

    On the screen, I have a dynamic text field with an instance name of the Topic1. When I play the movie, the text does not appear. I tried various options of incorporation of text and using _without, but this does not seem to do the trick either. Help!

    You say you have a textfield with an instance name of the topic1, but in your code, you also declare a variable Topic1 you cast as a string.  The two cannot coexist.  If you really have a textfield named topic1then assign the xml value using textfield...

    Topic1. Text = myXML.TOPIC [0]. FIELD_NAME;

    But do not use a varioable with the same name as the TextField

  • Definition of the values of height and width of a clip with XML file!

    How can I specify values of height and width of a clip using the external XML file? The user needs change the values of a specific clip [rectangular] using the xml file.

    How can I do?

    Thank you.

    You have difficulties with what part of the assistance from an xml file to store and retrieve data?  Do you know how to write the values of height and width, in the form of data in an xml file?  It could be something as simple as the following...

    200

    200

  • LinkButton access the list of URLS in the xml file

    Hello

    I have a list of URLS in an external xml file.  When my linkbutton is clicked, I want a new tab to open with the URL of the xml file.  I don't know how to save the xml file in my mxml component so that I am able to reference the URL in the xml file.

    This is how my xml is formatted:


    < xml >
    < link > http://www.Google.com < / link >
    < / xml >

    This is what my linkbutton code looks like:

    < mx:itemRenderer >
    < mx:Component >
    < mx:LinkButton label = "hyperlink" textDecoration = "underline" color = "#FF9900" fontSize = "11" / >
    < / mx:Component >
    < / mx:itemRenderer >

    Thank you!

    What other data would be displayed? The number of columns? All this will be in the xml file. You do not have to display the url in a column, but it must be linked with data from other columns. Thus, when you click on this line, the url is available from the itemClick Manager and open the link.

    Here's some code I've used; I've cut out a lot of things specific to my application, so you can get an error or two, but that's how you can get started:

    XML data file *.


      http://www.Google.com"target ="_blank"/ >
      http://www.Microsoft.com"target ="_blank"/ >
      http://www.Adobe.com"target ="_blank"/ >

    application *.

    Script block *.


    manage the results of service:
    public void linksServiceResult(event:ResultEvent):void {}
    linksxml = event.result as XML;
    }

    public void gotoLink(event:ListEvent):void {}
    navigateToURL (new URLRequest (dgLinks.dataProvider [event.rowIndex] .@url), '_blank');
    }

    ******* UI ************


     
      
        
         
           {data.@description}"/ >}
         

        
      
      

      
     

  • Problem loading an xml file if not placed locally.

    Hey!

    I started a discussion on my capture setting problem and I now reduced it now. It turns out it wasn't settings do not have caught. The swf file takes the fine settings, so this apparently isn't the issue. My problem is that it seems that the file won't loaded .xml. When I have my .xml and .swf file locally on my computer and it works, it works very well. When I place it on my web server the same way, it works fine. However, when someone puts my .swf in embedded on their Web site that the XML will not be loaded by the SWF for a reason any. Here's the AS3 code, load the xml file. He was works well all the way until I started playing with the call of the swf from different sources (web server of my friend in the integrating etc.).

    -loading of the external xml file.

    var urlRequest:URLRequest = new URLRequest ("http://www.website.com/folder/myfile.xml");

    var urlLoader:URLLoader = new URLLoader();

    var myXML:XML = new XML();

    var xmlList:XMLList;

    myXML.ignoreWhitespace = true;

    urlLoader.addEventListener (Event.COMPLETE, fileLoaded);

    urlLoader.load (urlRequest);

    function fileLoaded(event:Event):void {}

    the code to play with the xml file once loaded

    }

    It seems that fileLoaded() is never executed unless the swf runs locally or on my computer or my server or called directly in the browser (like by typing in the web address field). I really can't understand what is wrong. Any suggestion is appreciated!

    try to create a file crossdomain.xml with this information:

    http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">     
    
  • loads the hyperlink in picture of a xml file

    Hi all

    I'm completely new to Flex and got stuck with this problem:

    I would like to put a hyperlink in a picture, both are loaded from an external xml file

    XML looks like this:

    < project >
    < id > 0 < /ID >
    Google project < title > < / title >
    Image1.gif < image > < / image >
    www.Google.com < URL > < url >
    < date > 01/06/2008 < / date >
    < description > a few description < / description >
    < / project >


    The url must therefore be put into image 1

    Hope someone can help me...

    Thanks in advance!

    the example I posted above shows you how to pass XML information to a flex application,

    Here's an example of how make images act as hyperlinks

    http://www.mattlefevre.com/viewExample.php?tut=Flex&proj=image%20Hyperlink

    in your case, you'll want to pass the data.url value to the newBrowserWindow function

Maybe you are looking for