Write in xml

Can we write in Local XML file in flex , if yes please help
me how

Flex apps, which run in the Flash Player hosted by a browser,
cannot read or write local files. You might look into AIR (Adobe
Integrated Runtime) which can also run Flex apps, but apps written
for AIR can read and write local files.
You can find AIR in the Flex 3 Beta on Adobe Labs at
labs.adobe.com

Similar Messages

  • Writting a XML file from a DOM with the reference to a DTD

    Hi everyone,
    how can I write a XML file, that has a reference to a DTD like:
    <!DOCTYPE testdoc SYSTEM "testdoc.dtd">
    I have a DOM that contains my XML-Data and I want to have this line in the XML File. I'm using a Transformer to write this XML stuff in the file.
    Does anyone has an idea?
    Thanks in advance
    Andi

    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/OutputKeys.html
    transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "testdoc.dtd");

  • How to write processed XML while using XML DOM

    How can I write a Document Node type element in a file i.e. if I have a document and I loaded in memory using DOM then I processed it.Now I need to write it back to file.how can I do that

    Use a Transformer whose input is a DOMSource and whose output is some kind of Result which points at wherever you want to write the XML.

  • How to write a Xml installation file to build  web installer using IzPack.

    Hai everyone,
    I have got a problem in building a web installer using IzPack.I am getting this exception,when I am compiling my install.xml using a compile tool provided by IzPack soft.Eventhough I have not mentioned "packsinfo.xml" in my Xml installation file.
    Fatal error :
    null\packsinfo.xml (The system cannot find the path specified)
    java.io.FileNotFoundException: null\packsinfo.xml (The system cannot find the path specified)
    What went wrong??
    It is very very urgent. Could anyone tell me how to write a Xml installation file for building web installer,please??
    any help will be highly appreciated....
    Thank you very much in advance

    Hi,
    that is not really a java related question. Have you tried to find some IzPack support forum? I've never heard about it, so I can't help.

  • How to write an xml Document to a flat file using JAVA....

    Can any one help me out.....
    How to write a XML Document to the current filesystem using JAVA....
    without using com.sun.xml.tree.*....
    Document xmlDoc;
         Node rows = (Node) xmlDoc.createElement("ROWS");
    xmlDoc.appendChild(rows);
    and i have to write this xmlDoc to a file called(abc.xml) for further use...

    Have you considered using JDOM? ( www.jdom.org )
    The XMLOutputter class can write the Document to a file. ( The Document however will be an org.jdom.Document object ).
    If you are weary of a new API, you could just create a new File object called abc.xml and stream the data from the XML Document you have to this new File object.

  • Write / store xml data in Xe and retrieve stored data using pl/sql

    Hi to all,
    i'm searching a tutorial on:
    A - how to write / store xml data in Xe and retrieve stored data using pl/sql
    I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
    I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
    1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
    Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
    Thanx

    Thank you very much Carl,
    However my fault is that i've not tried to create the table via sql plus.
    Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
    however with a ddl script like the following the table was created successfully.
    create table example1
    keyvalue varchar2(10) primary key,
    xmlcolumn xmltype
    Thank you very much for your link.
    Message was edited by:
    Marcello Nocito

  • How to write non-XML data to a file using an OSB FTP Routing?

    Hi --
    Situation ... I need to write non-XML data to a file using FTP. A proxy service retrieves XML and transforms it with XSLT to CSV format, then gives it to a Biz service to file it out, using FTP. Simple.
    Problem ... OSB sends the contents of $body to any service it calls. Because $body is a SOAP document, it has to contain XML. So therefore I have to put my CSV data into an XML element, in order to put it into $body; and this inner element then gets written to the file, which I don’t want. But if I don't enclose my CSV content in a tag, I get "Unexpected CDATA encountered" trying to assign it to a variable.
    There has to be away around this!
    Thanks for your help.
    John Taylor

    Solved. Steps:
    -- Transform the XML to CSV using an XSL transform. Put the CSV data inside enclosing XML elements, and use a Replace action to put the XML element + CSV contents back into *$body*.
    -- Define an MFL transform that only knows about the enclosing XML elements. Use a delimiter of "\n" (hard return).
    -- Route from the proxy service to a Biz service that has Service Type = Messaging Service and Request Message Type = MFL; specify the MFL transform, which will receive the incoming *$body* variable, strip off the enclosing XML element within it, and pass the CSV contents to the FTP service.
    Edited by: DunedainRanger on Nov 29, 2011 9:03 AM

  • How Do I write an XML file using Java?

    Hello there!! to everyone reading my post.
    I have this project I need to do, and I have no clue where to start, I was wondering if you guys could help me out.
    I need to know how to write an XML file using a Java Program, but without using a Third party library.... just using java native APIs.
    I will probably take the values to construct the file from a form.
    I will certainly appreciate if you could post some sample code for me.
    Thank you very much in advance..

    Hello there!,
    I have some doubts about the Tutorial I am currently reading. correct me If I'm wrong, but the section "Write a simple XML file" teaches you how to do so using a text editor. I need to create my XML file from a running Java Program written by myself, that takes the values to build it from some variables.
    If I'm totally wrong about what I'm saying, could you please point me to where I can find the information of how to do what I'm asking for, inside the tutorial.
    Thank you very much,...
    sincerely.

  • Write in XML dynamically

    This is first time I'm trying to write in XML, so I'm sorry if this is a simple question. I have a textbox on the field which will be used for entering names, and I created XML tags using
    var objs:XML = new XML( <objects /> );
    var objname:XML = new XML ( <objectname /> );
    objs.appendChild( objname); // add the <name> node to <objects>
    I hope to have a XML structure of
    <object>
    <objectname>james</objectname>
    <objectname>jennice</objectname>
    <object/>
    But I do not know how to write from textbox in flash to the xml file, or dynamicly create a xml from as3. Please help, thanks in advance.

    But I do not know how to write from textbox in flash to the xml file, or dynamicly create a xml from as3.
    Flash alone can`t write to a users (or your own) filesystem you will need to look into AIR (publish your flash to AIR for Desktop to have access to the Filesystem). If you want the user allow to write a xml file serverside you will want to make use of a technology like php or asp in combination with flash.

  • How can i write a XML file with oracle data ?

    How can i write a XML file using PL/SQL.
    Can i do as follows.
    1.Open a file using UTL_FILE.FOPEN(LC_DIR_LOC,'abc.xml','W')     ;
    2.write all the required tag and value using UTL.put_line
    that is enough. Is not, please guide me to write.
    gk

    Having Oracle 9i.
    One more doubt. In the speck, some constand values are there, When i write the same into file, How can i write ?.
    1. l_str := ' "E27" '
    or
    2. l_str := ' E27 '
    UTL_FILE.PUT_LINE(L_FILE_POI,l_str,TRUE);          
    1 case : in XML file : "E27"
    In 2 case : E27
    When we write a XML file through editors , we have to define the constant within quote . is it?      
    Which one can i use ? Or any other way is there ..
    Thanks and Regards
    gopi

  • Write to XML File crashes when multiple Timed Loops present

    Hello All,
    It took me forever to track this bug down.
    In this project we can edit operating parameters on the Host and send them down to an RT program in a cRIO-9025. The data is converted to XML and stored on the cRIO's disk.
    Occasionally, the RT program would lock up and had to be rebooted.
    It turns out that if you use Timed Loops , then a Write to XML File (or presumably any file write) will not return.
    Attached is an example. This has 5 loops to make it crash faster, but it will eventually crash with only 2.
    Paul J
    Attachments:
    XML Write test.vi ‏93 KB

    Hello Chris,
    I know that Write to XML File fails because I put in debug code in my actual program, a flat sequence which updated an indicator, and after the crash, the indicator had not updated.
    Yes, I know that it replaces the file. It's a configuration file, not data gathering. This is just an example of the bug.
    FYI,
    I increased the period for the loop with the file save to 500msecs and it still crashed.
    I then decreased it to 50 msecs, and replaced all of the other Timed loops with While loops and it does not crash, even though the file save takes much longer than 50 msecs, average ~150msecs.
    I replaced the loop with the file save with a While loop while leaving the others as Timed loops and it does not crash.
    So the bug is systemic and related to a file save in a Timed Loop when there are other Timed Loops.
    I'm not looking for a solution, I'm only reporting a bug in Labview. The solution is not to use Timed Loops, especially, as you point out, when there is file saving. It cost me several days of dicking around to figure it out. Maybe someone can save some time if they find this.
    Paul J

  • Write & Modify XML Document on Midlet

    please help me, how to write & modify xml document on Midlet????
    I use KXML1.2 but it can't do write & modify. I read this documentation.... KXML just only read XML document....
    so everybody can help me.....
    please send your comment on my email... because my internet bandwith is so low. It's long time when I open this forum.
    thanks very much

    Check out with kXML 2
    Cheers,
    Rohan Chandane

  • How to write as XML file using java 1.5

    hi all,
    i am trying to create an XML file using java 1.5. I took a XML creating java file which was working with java 1.4 and ported same file into java 1.5 with changes according to the SAX and DOM implmentation in java 1.5 and tried to compile. But while writing as a file it throws error "cannot find the symbol."
    can any body help me out to solve this issue.......
    thankx in advance
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.NamedNodeMap;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.DocumentHandler;
    import org.xml.sax.InputSource;
    import org.xml.sax.helpers.ParserFactory;
    import java.io.*;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();                   
                   dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();                   
    Document xmlDoc =  db.newDocument();
    // this creates the xml document ref
    // parent node reference
    Element rootnd = (Element) xmlDoc.createElement("ALL_TABLES");
    // root node
    xmlDoc.appendChild(rootnd);
    Element rownd = (Element) xmlDoc.createElement("ROW");
    rootnd.appendChild(rownd);
    Element statusnd = (Element) xmlDoc.createElement("FILE_STATUS");
    rownd.appendChild(statusnd);
    statusnd.appendChild(xmlDoc.createTextNode("Y")
    FileOutputStream outpt = new FileOutputStream(outdir + "//forbranch.xml");
    Writer outf = new OutputStreamWriter(outpt, "UTF-8");
    //error is occuring here Since write method is not available in the Document class
    xmlDoc.write(outf);
    outf.flush();

    Hi,
    when I look in the JDK1.4.2 specification I don't see any write method in the Document interface.
    However, your solution is the Transformer class. There you transform your DOM tree into any output you need. Your code sould look something like this:     TransformerFactory tf = TransformerFactory.newInstance();
         // set all necessary features for your transformer -> see OutputKeys
         Transformer t = tf.newTransformer();
         t.transform(new DOMSource(xmlDoc), new StreamResult(file));Then you have your XML file stored in the file system.
    Hope it helps.

  • How to retrieve characters like '£' from the database and write to xml file

    Hi ,
    I have a requirement to retrieve the data from database and write to files in XML format.
    I am able to do so successfuly by using XMLElement tag and writing to file through UTL_File package.
    All characters like <&@^ get converted properly, but when it comes to multibyte chars like '£', they are not able to get converted as it is.
    Can somebody please advise me how to go ahead.
    Regards

    Thanks odie.
    The nls_charset for my database is WE8ISO8859P1 and database version is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi.
    The data (with pound sign) is sitting in one of the columns of the table and when i query it directly, I am able to view it properly.
    However when I use the below code to retrieve in XML format and print it to file, it gets changed. This file is also passed to one of the application GUI where this XML gets processsed and it is not visible properly.
    below id the sample abstract of code I am using.
    Declare
    l_file UTL_FILE.FILE_TYPE;
    l_clob CLOB;
    l_buffer VARCHAR2(32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    Begin
    SELECT XMLElement("case",
    XMLElement("comments",
    XMLElement("comment",
    XMLElement("comments",a.COMMENTS)
    ).getClobVal() val1 into l_clob
    FROM TO_COMMENTS a
    l_file :=
    UTL_FILE.fopen (XMLDIR,
    test.xml,
    'w',
    32767);
    LOOP
    DBMS_LOB.read (l_clob,
    l_amount,
    l_pos,
    l_buffer);
    UTL_FILE.put_line (l_file, l_buffer);
    l_pos := l_pos + l_amount;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.NEW_LINE('Reached end of file');
    END;
    The comments column given contains the character like pound.
    And once the file is generated and i see using the vi editor, the char is not viewable properly like £
    And when the same is passed to GUI application to be processed, its not viewable propely in GUI from IE as well like �.

  • Ref Cursors to write to xml file

    Hi,
    I am relatively new and i am looking at what other professionals have to comment.
    I am retriveing a ref cursor in Oracle and would like to store this information in an xml file along with another variable, as it would be easier to read/edit from an xml file rather than firing the stored procedure and picking/saving the ref cursor on every occassion that is required.
    Looking for what the experts have to say about this way.
    Also, i am looking at trying to implement this.
    How does one write to an xml document from a ref cursor in Oracle 9i
    Thank You
    Any help will be appreciated.

    You can not write REF Cursors directly to an XML file. One way to write REF Cursor data to an XML file would be to popoulate the Dataset using the REF Cursor and then use the XML functionality on Dataset to generate an XML file. Another way would be create an OracleDataReader and populate the XML file yourself.

  • Write CLOB XML output to a file on UNIX box (file size 32 K)

    All,
    Can someone give me a sample code of how to write a CLOB output in a CLOB variable (holds XML output generated from DBMS_XMLQUERY) to a text file on UNIX box?
    I found on ask tom a technique which only write upto 32K length. My CLOB output is more than 32K.
    from ASK TOM:
    create or replace
    procedure clob_to_file( p_dir in varchar2,
    p_file in varchar2,
    p_clob in clob )
    as
    l_output utl_file.file_type;
    l_amt number default 32000;
    l_offset number default 1;
    l_length number default
    nvl(dbms_lob.getlength(p_clob),0);
    BEGIN
    l_output := utl_file.fopen(p_dir, p_file, 'w', 32760);
    while ( l_offset < l_length )
    loop
    utl_file.put(l_output,
    dbms_lob.substr(p_clob,l_amt,l_offset) );
    utl_file.fflush(l_output);
    l_offset := l_offset + l_amt;
    end loop;
    utl_file.new_line(l_output);
    utl_file.fclose(l_output);
    end;
    Thanks

    Fortran and C strings are different. When passing a string to Fortran from C, you have to know the Fortran string's length, and pad the trailing part of the string with blanks (spaces). Modern C functions never write a string without a NUL terminator, so you cannot write directly to the Fortran string unless you ensure there is at least one extra character. My guess is that your output strings contain embedded NUL characters, which somehow causes problems in the file I/O routines, but not to stdout.
    According to your C fread() calls, I am assuming that you use hard-wired lengths of len(nis)==15 and len(sys)==32.Here is an example that may work, (without the #includes). It is similar to yours, but blanks-pads the result starting from the first control or NUL character. It is also a subroutine (void result) because 'bit' was just returned uninitialized in your code. Like yours, there is no error checking, but NIS should end up all blanks if there is an error.
    #define NIS_LEN 15
    void operating_sys(char nis[NIS_LEN]) {
      int i;
      FILE *stream;
      nis[0]=0;
      stream=popen("/bin/nisdomainname","r");
      fgets(string,sizeof(string),stream);
      fread(nis,1,NIS_LEN,stream);
      pclose(stream);
      for (i=0;i<NIS_LEN;i++) {
        if (nis<' ') {
    memset(&nis[i],' ',NIS_LEN-i);
    break;

Maybe you are looking for