Writing into XML File in Flex

Hi,
I want to create a XML file (dynamically) and writes data
into that xml file(data coming from web service).
Thanks in advance.

i want to write the data(coming from web service) into XML
file and keep that XML file in Cache,then read that XML file
contents and post into UI Control(Datagrid).
<b>Sample Output Data from my Webservice:</b>
<CoreProgramming>
<BasicProgramming>
<ProductId>10049</ProductId>
<ProgrammingName>America'sTop60</ProgrammingName>
<Price>29.99</Price>
<IncludesLocals>false</IncludesLocals>
<IncludesRSN>false</IncludesRSN>
<Listing>
<CategoryName>WOMEN'SPROG</CategoryName>
<Station>
<StationCallLetters>TLC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
</Listing>
</BasicProgramming>
<BasicProgramming>
<ProductId>10041</ProductId>
<ProgrammingName>America'sTop120</ProgrammingName>
<Price>39.99</Price>
<IncludesLocals>false</IncludesLocals>
<IncludesRSN>true</IncludesRSN>
<Listing>
<CategoryName>WOMEN'SPROG</CategoryName>
<Station>
<StationCallLetters>TLC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>DHLTH</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>DISC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
</Listing>
</BasicProgramming>
<BasicProgramming>
<ProductId>10045</ProductId>
<ProgrammingName>America'sTop180</ProgrammingName>
<Price>49.99</Price>
<IncludesLocals>false</IncludesLocals>
<IncludesRSN>true</IncludesRSN>
<Listing>
<CategoryName>WOMEN'SPROG</CategoryName>
<Station>
<StationCallLetters>TLC</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>DIY</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
<Station>
<StationCallLetters>LIME</StationCallLetters>
<Hdflag>false</Hdflag>
</Station>
</Listing>
</BasicProgramming>
</CoreProgramming>

Similar Messages

  • Extracting Data into XML file

    Hi all,
    I am extracting data from one table into an XML file using a procedure.
    This procedure is executing fine.
    But one problem is that, once the file size get 34KB, no more data is writing into that file.
    No exceptions also. I can see the partial data in that XML file.
    Please share your inputs.
    Thanks
    Rajeev.

    Sure...
    CREATE OR REPLACE PROCEDURE extractToXML(pTname varchar2,rowSettag varchar2,rowTag varchar2,filename varchar2)
    IS
    BEGIN
    declare
    v_ctx dbms_xmlquery.ctxtype;
    v_file utl_file.file_type;
    v_xml clob;
    v_more boolean := true;
    BEGIN
    -- create xml context.
    v_ctx := dbms_xmlquery.newcontext('select * from '||pTname);
    dbms_xmlquery.setRowSetTag(v_ctx,rowSettag);
    dbms_xmlquery.setRowTag(v_ctx,rowTag);
    v_xml := dbms_xmlquery.getxml(v_ctx);
    dbms_xmlquery.closecontext(v_ctx);
    -- output html document to file
    v_file := utl_file.fopen('C:\oraload', filename, 'W',32767);
    while v_more loop
    utl_file.put(v_file, substr(v_xml, 1, 32767));
         dbms_output.put_line('Length of XML '||length(v_xml));
    if length(v_xml) > 32767
    then
    v_xml := substr(v_xml, 32768);
         dbms_output.put_line('Inside IF Length of XML '||length(v_xml));
    else
    v_more := false;
    end if;
    end loop;
    utl_file.fclose(v_file);
    dbms_output.put_line('Coke Completed Successfully');
    exception
    when others then
    dbms_output.put_line(substr(sqlerrm,1,1000));
    utl_file.fclose(v_file);
    end;
    END;

  • Manipulating  XML file using flex 2.0

    Hi,
    how to add contents in to xml file using flex 2.0, ie i
    actually wants to write data in to a xml file, so that data to be
    appended at the end of the file.
    Kumar

    You can't! Well, at least Flex cannot do this. All Flex can
    do is send this data -- any data -- to the server and it's up to
    you how you want to append this data to a file on the server.
    You see, flex can't write to local files. If you looking for
    client side file manipulation, take a look at Flex's desktop
    brother call AIR!
    ATTA

  • Why we need to conver Context  Node data into XML file----Export to Excel

    Hi All,
    Let me clarify my dought........today i have gone through the concept of  "Exporting Context Data Using the Webdynpro Binary cache" in SAP Online Help.
    From the SAP Online Help pdf document, i have found that, the context node data has been converted first in to XML file,after that file had been stored in the web dynpor binary cache...bla....bla.........
    Here my qtn is why they had converted context node data into XML file. With out doing that can not we export context node data to excel file..?
    Regards
    Seshu
    Edited by: Sesshanna D on Dec 19, 2007 7:25 AM

    Hi Sesshanna,
    it is not neccessary to do that but xml has the advantage, that it can be easily transformed into every output format that might occur in later project stages.
    If it's simply about blowing out some Excel, I suggest using an OSS library such as jexcelAPI or Jakarta POI and building the Excel how you need it.
    regards,
    Christian

  • Insert Encoding tag into xml file. ?xml version="1.0"?

    I am using oracle 10g.
    I am using dbms_xmlgen.getxml function to generate xml data for oracle tables. I use utl_file to write data back into xml file.
    Oracle is generating the file in the following manner...
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <RSLT_ID>1</RSLT_ID>
    </ROW>
    </ROWSET>
    I want to change the following xml header to have encoding information in it as follows...
    <?xml version="1.0" encoding = "AL32UTF8"?>
    How do I achieve that?
    Any suggestions?

    I want to change the following xml header to have encoding informationIn 10g I think you could use a xmlroot hack:
    SQL> select xmlroot(xmlelement(e, dummy), version '1.0" encoding="AL32UTF8') xml from dual
    XML                                                    
    <?xml version="1.0" encoding="AL32UTF8"?>              
    <E>X</E>                                               
    1 row selected.

  • How can convert HTML file into xml file?

    Hi,
    I am receving one HTML file as an input and i want to convert that receiving(html file) into .xml file.Is there any converter (tools)to do this.Pls if any give me the details with regard.
    Regards,
    mahesh.

    Use the HTMLEditorKit to parse the html file.
    this kit is having the callback methods which
    are called wenever the tag appears in the HTML
    stream.

  • How should convert text file into XML file?

    I do a project "WEB SERVER LOG ANALYZER" using JSP. For that i copy the content of log file into the other file . how i convert it into XML file . xplain with coding

    Read this [page.|http://www.devx.com/getHelpOn/10MinuteSolution/20356]

  • How to convert Xls file into Xml file

    Hi,
    I am trying to convert Xls file into Xml  but there  is no any direct procedure for it
    Pls help me out to convert Xls file into Xml file
    Thanks
    Anushree

    you will require to write a module in your file adapter for the same.
    ref: /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter as mentioned in the earlier post.
    Else you can also use Conversion Agent to read the same.
    Ref: http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm

  • OSB cluster --reading a writing into a file

    Dear All,
    I have a requirement in which my first OSB service s writing into a file(In a clustered environment).So in this case some of the files are being written in managed_server1 while some of the files are getting written in managed_server2.
    My second OSB service has to poll those files.Now as we know while polling,we have to define one target server(managed server).So this service will only be able to poll from one managed server.Is there any way it can poll from both the managed servers?

    Hello Deepthi,
    Can you please explian what is meant by shared storage as i am not aware of that.From shared storage, I meant common mounted/mapped file system.
    We have 2 managed servers on two different physical machines and we are using clustered environment.In this case you have two option -
    1. Use unique endpoint & mask combo for both the proxies and make sure that all the servers in the cluster have access to the staging directory of the polling manged server (by mounting/mapping the file system appropriately).
    2. Create a shared storage by mounting/mapping the file system for business services to put file and have a single proxy to poll that shared storage. Again all managed server need to have access to the staging directory of the polling manged server.
    You may like to refer metalink note ID 965135.1
    To understand how to achieve HA in this case, please refer -
    OSB10gR3:High-availbility of file protocol based proxy service
    Regards,
    Anuj

  • How to convert database table into xml file

    Hi.
    How to convert database table into XML file in Oracle HTML DB.
    Please let me know.
    Thanks.

    This not really a specific APEX question... but I search the database forum and found this thread which I think will help
    Exporting Oracle table to XML
    If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
    http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
    Hope this helps
    Chris

  • Why do I get a NI-488 error massage when writing into a file and at the same time copiyng this file with a backup softwarre like Easy2Sync?

    I have a small LabVIEW program which writes random numbers very fast into a ASCII-file. I want that file to be copied to a new position every 10 min. Therefor I use a backup/synchronisation software which is doing a copy operation every 10 min. It works fine a certian amount of time and after a while I get either an LabVIEW error (LabVIEW: Fiel already open: NI-488 Comand requieres GPIB Controller to be System controller) or an backup-software error (couldn´t open file...whatever). I´m guessing, it has something to do with file-access but I don´t know why?!? If I run the LabVIEW program and I copy and paste the random-number-file with the windows explorer very fast (pressing ctrl+v rapidly) while LabVIEW is still writing into this file, no error appears. Can sombody help me?
    LabVIEW 2011

    Hi Serdj,
    you don't get a GPIB error, the error number has just 2 different explanations...
    Well, you have two programs accessing the same file. One program just wants to make a copy, the other (LabView) is trying to write to the file. When copying a file that is written to you get inconsistent results! That's why one of both programs is complaining an error...
    You can't have write and read access at the same time! (But you can have more than one read access at the same time...)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • ORA-48913: Writing into trace file failed

    Hi
    my OS: OUL5x64
    DB: 11.1.0.7
    receive this error in alert.log but could not figure out which parameter to increase.
    Can someone please help.
    Non critical error ORA-48913 caught while writing to trace file
    Error message: ORA-48913: Writing into trace file failed, file size limit [10485760] reached
    the suggestion:
    ORA-48913: Writing into trace file failed
    *Cause:An attempt was made to write into a trace file that exceeds the trace's file size limit
    *Action:increase the trace's file size limit.
    Thanks in advance.

    Hi ,
    I have one more doubt :
    ORACLE_SID=XXXX
    /XXXX/XX/ofaroot/XXXX/diag/rdbms/xxxx/XXXXX/trace
    Non critical error ORA-48913 caught while writing to file "trace /XXXX/XX/ofaroot/XXXX/diag/rdbms/xxxx/XXXXX/trace/XXXX_ora_8218.trc"
    Error message: ORA-48913: Writing into trace file failed, file size limit [10485760]everywhere its written to increase the parameter max_dump_file_size or to relocate the alert log, but as far as i understand ,
    is this because a trace file with the name XXXX_ora_8218.trc was getting generated with a greater size than the one defined in max_dump_file_size. Is this what happened ?
    Also , I am not able to find what directory does this parameter points to ? is it the trace directory or diag directory ?
    i checked select * from v$diag_info ,but i could not find any conclusion.
    Probably , on getting the above info , i will be able to decide where to move the alert.log to create space.

  • 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

  • Code for JProgressbar for monitoring  while writing into a files

    Could anybody help me in sample code to implement a JProgressbar while writing into a file.

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.reflect.*; // for InvocationTargetException
    public class Test extends JApplet {
         private JProgressBar pb = new JProgressBar();
         public void init() {
              Container contentPane = getContentPane();
              final JButton startButton = new JButton("start");
              contentPane.setLayout(new FlowLayout());
              contentPane.add(startButton);
              contentPane.add(pb);
              startButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        GetInfoThread t = new GetInfoThread(Test.this);
                        t.start();
                        // this is okay because actionPerformed
                        // is called on the event dispatch thread
                        startButton.setEnabled(false);
         public JProgressBar getProgressBar() {
              return pb;
    class GetInfoThread extends Thread {
         Runnable getValue, setValue;
         int value, currentValue;
         public GetInfoThread(final Test applet) {
              getValue = new Runnable() {
                   public void run() {
                        JProgressBar pb = applet.getProgressBar();
                        currentValue = pb.getValue();
              setValue = new Runnable() {
                   public void run() {
                        JProgressBar pb = applet.getProgressBar();
                        pb.setValue(value);
         public void run() {
              while(true) {
                   try {
                        Thread.currentThread().sleep(500);
                        // This is okay because the getValue's run()
                        // is invoked on the event dispatch thread
                        value = (int)(Math.random() * 100);
                        try {
                             SwingUtilities.invokeAndWait(getValue);
                        catch(InvocationTargetException ite) {
                             ite.printStackTrace();
                        catch(InterruptedException ie) {
                             ie.printStackTrace();
                        if(currentValue != value) {
                             SwingUtilities.invokeLater(setValue);
                   catch(InterruptedException e) {
                        e.printStackTrace();
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.reflect.*; // for InvocationTargetException
    public class Test extends JApplet {
         private JProgressBar pb = new JProgressBar();
         public void init() {
              Container contentPane = getContentPane();
              final JButton startButton = new JButton("start");
              contentPane.setLayout(new FlowLayout());
              contentPane.add(startButton);
              contentPane.add(pb);
              startButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        GetInfoThread t = new GetInfoThread(Test.this);
                        t.start();
                        // this is okay because actionPerformed
                        // is called on the event dispatch thread
                        startButton.setEnabled(false);
         public JProgressBar getProgressBar() {
              return pb;
    class GetInfoThread extends Thread {
         Runnable getValue, setValue;
         int value, currentValue;
         public GetInfoThread(final Test applet) {
              getValue = new Runnable() {
                   public void run() {
                        JProgressBar pb = applet.getProgressBar();
                        currentValue = pb.getValue();
              setValue = new Runnable() {
                   public void run() {
                        JProgressBar pb = applet.getProgressBar();
                        pb.setValue(value);
         public void run() {
              while(true) {
                   try {
                        Thread.currentThread().sleep(500);
                        // This is okay because the getValue's run()
                        // is invoked on the event dispatch thread
                        value = (int)(Math.random() * 100);
                        try {
                             SwingUtilities.invokeAndWait(getValue);
                        catch(InvocationTargetException ite) {
                             ite.printStackTrace();
                        catch(InterruptedException ie) {
                             ie.printStackTrace();
                        if(currentValue != value) {
                             SwingUtilities.invokeLater(setValue);
                   catch(InterruptedException e) {
                        e.printStackTrace();

  • Conversion of xls file into xml file

    Hi,
    i want to convert xls file into xml
    pls let me know the procedure for it
    Thanks

    Hi Anu,
    U can use FM <b>SAP_CONVERT_TO_XML_FORMAT</b> to convert data to XML.
    Or u can use some threads related to this FM. So that u can get better idea about this.
    Check this link also
    conversion of xls file into xml file
    regards,
    raghu

Maybe you are looking for