Create and save XML file

Is Flex able to take form data, put it into an XML file, and
then save that xml file in a specific folder on my server? If so,
could someone point me to a tutorial or an example? Thanks so much
for your help.

I think we are in a bad neighborhood of Flex. Here's what I
found from the forums so far:
"'ve been down this road before, and it isn't possible right
now. It is on our list for the future as this is a much-desired
feature. We are limited to what the browser environment offers.
Plus we have a deep committment to maintain a high standard of
security. Allowing Flash applications to read and write files
directly to the user's hard drive would violate that trust. So part
of our future task is to figure out how to do this in keeping with
the spirit of our security efforts.
Peter Ent
Senior Flex Product Support Engineer
http://weblogs.macromedia.com/pent
Since "we're limited to what the browser environment offers"
we can always use the Save As... to save content directly to the
server or hard drive. I know that's brute force and not what you
are looking for but it is a start. There was some discussion about
Active X which I am not a fan of either. Oh Well...

Similar Messages

  • How to create and save a file in flex web application ?

    Hi,
          I want to create and save a file form flex web application. Is it possible ?
    I have done some googling and found that its only possible through file referece, which needs some serverside implementation be called.
    Is it not possible with file reference to create and save file directly ?
    Can any one suggest how to over come this.
    Thanks in advance.

    Alex,
    code written with the Flex Builder 3 libraries will certainly run in Flash Player 10. However, what you need is not so much the capabilities of FP10 but the library functionalities of the Flex 4 package. And I think that Flex 4 code will only run in FP10 and not 9 (but haven't tested this as at work we have not yet been permitted to upgrade, so there is not a lot of point going for Flex 4!).
    Richard

  • How does APEX create and save new files. What extension does it save in?

    Hi can someone help me with this question?
    How does APEX create and save new files. What extension does it save in?
    Cheers!
    VJ

    It's really too bad we can't see VJ's face when the concept sinks in. This is one of my favorite moments when teaching APEX classes. Most people love it, some people don't. If nothing else it really proves the power and performance of the Oracle database. Each page view can generate 40+ queries, yet on the average system this takes less than .04 seconds.
    Keep in mind there are no undocumented features or "Oracle Internals" that the APEX team uses to achieve this performance, just sound database design. With every feature they add they evaluate how it will be used and design the tables and indexes to most efficiently answer the query. Sometimes this means going against "purist" normalized principals.

  • Create and writing xml file

    Hi all.
    I'm starting to learn Java. In my project, I have a class data structure, and I want to save its information into xml file for record. But I'm not sure how to do..
    Does java provide easier interface to construct an XML file ? or I need to use OutputStream ?
    Can anyone give me some examples or teach me how to do?
    many thanks

    Hi,
    The code you have written looks great and nothing really needs to be changed. I will offer a couple of comments though.
    The first is that there is an easier API for adding attributes that you might wish to use. The following:
    rootElement.setAttribute(Tag_Version, "3");Is equivalent to:
    Attr atr = document.createAttribute(Tag_Version);
    atr.setValue("3");
    rootElement.setAttributeNode(atr);Also whenever possible I prefer to use standard APIs rather than proprietary ones. I took your code and rewrote it using JAXP APIs, more code is required since JAXP does not offer the same convenience as the XDK but multiple parsers support the JAXP standard (including the XDK) and this makes your code portable across different parser implementations.
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class Example {
        private static String Tag_Main = "main";
        private static String Tag_Version = "version";
        private static String Tag_SetupName = "setup-name";
        private static String Tag_Remarks = "remarks";
        public static void main(String[] args) throws Exception {
            OutputStream outStream = new FileOutputStream("abc.xml");
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document document = documentBuilder.newDocument();
            Element rootElement = document.createElement(Tag_Main);
            rootElement.setAttribute(Tag_Version, "3");
            document.appendChild(rootElement);
            Element em = document.createElement(Tag_SetupName);
            em.appendChild(document.createTextNode("Setup 1"));
            rootElement.appendChild(em);
            em = document.createElement(Tag_Remarks);
            em.appendChild(document.createTextNode("My Testing"));
            rootElement.appendChild(em);
            TransformerFactory transformerFactory = TransformerFactory.newInstance();
            Transformer transformer = transformerFactory.newTransformer();
            DOMSource source = new DOMSource(document);
            StreamResult result = new StreamResult(outStream);
            transformer.transform(source, result);
            outStream.flush();
            outStream.close();
    }-Blaise

  • My boss cannot create a new subfolder by pressing "new folder" until he's already saved the file to his desktop. A "read only" error appears the first time. Is there a way to create and save to subfolder directly? It's Mavericks/Macbook Pro

    Hi, when my boss wants to save a new file in a new subfolder, he presses "new folder" but cannot create a new one because a “read only” error box appears. Once he saves the file to his Desktop he clicks on “save as” again and then he can create a new subfolder by pressing “new folder.” Is there a way to create and save to a subfolder directly without having to first save somewhere else?

    Your server file handling has nothing, and really nothing to do with Adobe software. If files don't get locked for (over-)writing and/or lose connection to the program opening them, then your server is misconfigured. It's as plain and simple and that. Anything from "known file types"/ file associations not being set correctly, MIME types being botched, crooked user privileges and file permissions, missing Mac server extensions, delayed file writing on the server, generic network timeout issues and what have you. Either way, you have written a longwinded post with no real value since you haven't bothered to provide any proper technical info, most notably about the alleged server. Either way, the only way you can "fix" it is by straightening out your server and network configuration, not some magic switch in Adobe's software.
    Mylenium

  • Create and save a .pdf file

    Afternoon!  I am creating a pdf utilizing the cfdocument tag and it works great.  It opens and displays well.  My question is, is there a way to automatically save that generated pdf on the server without opening it?  My end goal is to run a scheduled task every week that creates and saves a pdf automatically.

    <cfdocument format="pdf" orientation="landscape" filename="YourPDFName.pdf" overwrite="yes">
    it will save a copy of the pdf in the same folder as the <cfdocument> is run from, the problem I got is it wond display the pdf at creation time, all that is returned to my screen is the letter "z"
    so may be best to fun the code in a loop and one time add in the filename and overwrite paramaters, if you dont need it displayed, then your gold.
    Craig Wiseman

  • How to open, edit, and save XML

    I hav a problem in creating jsp file that can open, edit, and save xml!Anyone can help me?!!!

    Use a bean to do the job. pass the required params to the bean.

  • Open and Save Excel Files

    Hi All,
    I need code of How to open and save excel file in local system in Oracle forms.
    With Regards,
    Chandra Shekhar

    Hello Chandra,
    Webutil can be used to achieve this functionality.
    STEPS TO FOLLOW
    ================
    1. Install and configure Webutil following instructions in the webutil manual
    and the readme file.
    2. Create a form with a block Eg. DEPT
    3. Create a button, and in that button put the following code -
    DECLARE
    application Client_OLE2.Obj_Type;
    workbooks Client_OLE2.Obj_Type;
    workbook Client_OLE2.Obj_Type;
    worksheets Client_OLE2.Obj_Type;
    worksheet Client_OLE2.Obj_Type;
    args Client_OLE2.List_Type;
    cell ole2.Obj_Type;
    j INTEGER;
    k INTEGER;
    BEGIN
    application := Client_OLE2.create_obj('Excel.Application');
    workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');
    workbook := Client_OLE2.Invoke_Obj(workbooks, 'Add');
    worksheets := Client_OLE2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := Client_OLE2.Invoke_Obj(worksheets, 'Add');
    go_block('dept');
    first_record;
    j:=1;
    k:=1;
    while :system.last_record = 'FALSE'
    loop
    for k in 1..3 /* DEPT has 3 columns */
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    End If;
    next_item;
    end loop;
    j:=j+1;
    next_record;
    end loop;
    /* For the last record */
    for k in 1..3
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    End If;
    next_item;
    end loop;
    Client_OLE2.Release_Obj(worksheet);
    Client_OLE2.Release_Obj(worksheets);
    /* Save the Excel file created */
    args := Client_OLE2.Create_Arglist;
    Client_OLE2.Add_Arg(args,'d:\test.xls');
    Client_OLE2.Invoke(workbook, 'SaveAs', args);
    Client_OLE2.Destroy_Arglist(args);
    /* release workbook */
    Client_OLE2.Release_Obj(workbook);
    Client_OLE2.Release_Obj(workbooks);
    /* Release application */
    Client_OLE2.Invoke(application, 'Quit');
    Client_OLE2.Release_Obj(application);
    END;
    4. Save the form and compile it.
    5. Run the form.
    6. Execute the query in the block.
    7. Click on the button.
    8. An excel file will be created in the d:\ directory by the name test.xls.
    Kind regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly.

  • Help with creating a new XML file from an existing DOM tree!!

    i want to create a new XML file from an existing DOM tree
    i used this code to create a new document:
    static public Document createDocument(String fileName) throws ParserConfigurationException//,IOException,SAXException
              try {
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setIgnoringComments(true);
                   factory.setIgnoringElementContentWhitespace(true);
                   factory.setValidating(true);
                   DocumentBuilder builder =factory.newDocumentBuilder();
                   return builder.newDocument();
    //          handle exception creating DocumentBuilder
              catch ( ParserConfigurationException parserError ) {
                        throw new ParserConfigurationException();
              }then i used this code to transform the DOM :
    public void exportDocument(Document document) {
              try {
                   Source xmlSource = new DOMSource( document );
                   Result result = new StreamResult( System.out );
                   TransformerFactory transformerFactory =
                        TransformerFactory.newInstance();
                   Transformer transformer =transformerFactory.newTransformer();
                   transformer.setOutputProperty( "indent", "yes" );
                   transformer.transform( xmlSource, result );
           //then catching the exceptions
    But the file was not created and i didn't find where can i specify the DTD that the XML file should use and where can i enter the name of the XML file itself
    Another questoin can i write a DTD file dynamically during the execution of the program??

    Cross-post: http://forum.java.sun.com/thread.jspa?threadID=784467&messageID=4459240#4459240

  • How to set SAXParser at command-line interface to create a large XML file

    Hi,
    I am trying to create a large XML file (more than 50 MB) by selecting from Oracle database but failed because of "out of memory" error. According to "Oracle XML Developer Guide", we should use SAXParser to parsing a large XML file. But there is no example to show how to set SAXParser at command-line
    Following is what I use to get xml files. It works only when the file is small.
    java OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    When I set SAXParser at the way below,
    java oracle.xml.parser.v2.SAXParser OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    it failed with the error message: "In class oracle.xml.parser.v2.SAXParser: void main(String argv[]) is not defined"
    Does anyone know how to solve the problem? I'll be appreciated very much for your help.
    Yi

    here are my ideas.
    register the xml schema.
    using xmldom, generate the desired xml output and return as xmltype.
    then you can use something like this to check.
    declare
    xmldoc xmltype ;
    begin
       -- populate xmldoc from you xmldom function
       -- validate against XML schema
       xmldoc.isSchemaValid(schema_url, root_element);
       if xmldoc.isSchemaValid = 1 then
            --valid schema
       else
            --invalid
       end if;
    end

  • Is it possible to create and save a .PDF without any compression to the resulting .PDF?

    I need an uncompressed file so I can use the resulting PDF to do a find/replace. Can't do it with compression.
    Thanks
    JDRHC1115

    Dave,
    Thanks for the reply. Of all the suggestions I've received this seemed to
    be most promising. I gave it a try and the problem is that when I attempt
    to save as optimized a message box pops up and says I have to save my
    document first. Low and behold when I save it, compression occurs. Even
    when I select the options you suggest I'm left with a compressed document.
    I'm using Acrobat Pro X
    Jeff
    From:   Dave Merchant <[email protected]>
    To:     Jeff Ross <[email protected]>
    Date:   01/06/2011 09:35 AM
    Subject:        Is it possible to create and save a .PDF
    without any compression to the resulting .PDF?
    You don't want the UncompressPDF plugin - that's designed to split out the
    COS objects but doesn't remove the Flate encoding (plus if you've never
    compiled a plugin before, it's not really the time to learn).
    Instead, simply save your PDF file using the PDF (Optimized) file type,
    click the Settings button and under "Clean Up" - "Object compression
    options", choose "Remove compression". Turn everything else off if you
    want to retain the PDF content exactly as it was before.
    Your document-level scripts will then be in the file as plain text.

  • How to create a Plan.xml file for modification

    Hi,
    I am trying to create a plan.xml file. Is there any way, I can generate a plan.xml file.
    I see a tab in Admin Console in deployments and plan. but there is nothing there. what it has to do with plan.
    Thanks
    regards
    Amir riaz

    You can find the steps here.
    http://weblogic-wonders.com/weblogic/2009/11/29/plan-xml-usage-for-message-driven-bean/
    http://weblogic-wonders.com/weblogic/2009/12/16/invalidation-interval-secs/

  • How do I create a sidecar.xml file?

    Hello- I have used Johannes' very rad sidecar generator and adobe's instructions on how to upload the file, but can't seem to get it to work. I have a feeling it's because they both start with an assumption:
    "Use a text editor or an XML editor to create a sidecar.xml file..."
    "Write the lines into a sidecar.xml file"
    How do I create the original sidecar.xml file, in which to paste the metadata generated by Johannes' tool?
    http://projects.nordsueddesign.de/sidecarxml/#
    http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60606c7754128c7a9c00e-7f ff.html

    You use the web interface of xmlsidecar generator made by Johannes Henseler and the push the button there "generate". Copy paste that into a plain text file and then change tex extension from txt to xml. That's how you do a sidecar.xml the easy way.
    Afterwards, yo've got to import "multiple files" (or "many files"... my DPS is a Spanish one) from Folio Builder.
    If the folder are structured properly, folio builder will start swallowing the data of sidecar and uploading the articles.
    Right now, while posting this, my pc is doing that with about one hundred articles. As happy and busy as a beaver in heat
    Gustavo (Posting from Madrid)

  • Create and save custom transition

    Hi, I made a custom transition in FCP using video filters and keyframes and would like to save it to be able to use it again. Is there any way in FCP to create and save transitions? What files actually are the transitions included in FCP?

    I did a search and now I know, that the filters and transitions are written in FXScript languge. For those who're interested, there's an official Apple Using FX Script pdf ( http://developer.apple.com/documentation/AppleApplications/Conceptual/Using_FXSc ript/UsingFXScript.pdf ) and a really nice website with FX Script reference - http://www.fxscriptreference.org/ ...

  • How to create and save playlist using JMF?

    Hello i m new to JMF. Can anyone tell me how to create and save a playlist of media files using JMF.
    also how can i play .DAT files using JMF?
    Does JMF supports AVI,Asf files?

    Hello i m new to JMF. Can anyone tell me how to create and save a playlist of media files using JMF.
    also how can i play .DAT files using JMF?
    Does JMF supports AVI,Asf files?

Maybe you are looking for

  • When i plug my ipod into my computer and went to itunes it didnt come up in my devices. why is that?

    ive tried to unplug my ipod many times and plug it back it but that didn't help, ive also tried to find it in my itunes that didn't work either !WHATS WRONG WITH MY IPOD !! please help me

  • PI 7.1 JMS adapter - Inputs required.

    Hello Folks, There is a requirement to put the below message on the JMS queue. EDI_DC40  2000000000001046284700 0312  PEXR2002                                                    PAYEXT                                     PAYEXTSAPSD0    LS  SD0_200  

  • Select-options as a external subroutine

    hi all, plz solve my problem. this is my first program. tables vbak. select-options x for vbak-vbeln. types : beginf of ty, a tupe vbak-vbeln, b type vbak-ernam, end of ty. data : itab type table of ty,          wa type ty. perform sub(znava) using x

  • Plot X-Y graph have multiple X Axis with same Y axis

    i want to plot array data to xy graph which has multiple X axis and 1 Y axis. array formate is as shown below TOF(x- axis)     M/Q (x axis)     Events(Y axis) 10                          1                     0 20                          2          

  • How to lengthen multiple clips at once

    I'm working on a project that has seven tracks of video. And every time i need to align all the tracks exactly the same length i have to separately stretch each clip with the mouse. I know there's quick way to make all seven tracks the same length wi