Generate an xml-file by using javascript

Hi,<br /><br />i'm working on a form with Adobe Designer.<br /><br />My goal is to generate my own xml file using javascript, attach this to mail also generated by using javascript (app.mailMsg(false, "<mail address>", "", "", "<mail subject>", "<mail body>" --> this works already :-)) and send it.<br /><br />By now i have:<br /><br />---------------- my code --------------------------------------<br /><br />var container = "";<br /><br />container = "<?xml version="1.0" encoding="UTF-8"?>\n";<br />container = container + "<header>\n";<br />container = container + "<author> author name</author>\n";<br />container = container + <authorMail>my mail</authorMail>\n";<br />container = container + "</header>\n";<br />container = container + "<Daten>\n";<br />container = container + "<name>" + field.value + "</name>\n";<br />container = container + "<adresse>" + field.value + "</adresse>\n";<br />container = container + "<ort>" + field.value + "</ort>\n";<br />container = container + "<staat>" + field.value + "</staat>\n";<br />container = container + "<plz>" + field.value + "</plz>\n";<br />container = container + "<land>" + field.value + "</land>\n";<br />container = container + "</daten>\n";<br /><br />---------------- end of my code -------------------------------<br /><br />This works fine, and i have my xml content in the var container.<br />After that i try this:<br /><br />---------------- my code --------------------------------------<br /><br />var myDoc = event.target;<br />myDoc.createDataObject("filename.xml", container);<br />myDoc.exportDataObject("filename.xml");<br /><br />---------------- end of my code -------------------------------<br /><br />Instead of event.target i write down click.Form1<br />This doesn't work at all :-( anyone an idea?<br /><br />Lots of thanks for your help,<br />aldo

Hi everybody,<br /><br />the code works good now. so it should be available for everybody who needs it:<br /><br />---------------- my code --------------------------------------<br /><br />var container = "";<br /><br />container = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";<br />container = container + "<all>\n";<br />container = container + "<header>\n";<br />container = container + "<author>author name</author>\n";<br />container = container + "<authorMail>[email protected]</authorMail>\n";<br />container = container + "</header>\n";<br />container = container + "<body>\n";<br />container = container + "<name>" + value + "</name>\n";<br />container = container + "<adresse>" + value + "</adresse>\n";<br />container = container + "<ort>" + value + "</ort>\n";<br />container = container + "<staat>" + value + "</staat>\n";<br />container = container + "<plz>" + value + "</plz>\n";<br />container = container + "<land>" + value + "</land>\n";<br />container = container + "</body>\n";<br />container = container + "</all>\n";<br /><br />var myDoc = event.target;<br />myDoc.createDataObject("export.xml", container);<br />myDoc.exportDataObject("export.xml");<br /><br />app.mailMsg(false, "mail-address1; mail-address2", "", "",<br />"mail subject", "mail body");<br /><br />---------------- end of my code ------------------------------- <br /><br />now i'm looking for a solution to automatically attach the file to this mail and directls sent it without to call up the mail client.<br />if anybody has got an hint, you're welcome ;-)

Similar Messages

  • Generating a XML file from a JSP request Page

    Hi,
    I am very new to JAVA with XML. My need is i want to capture some data in in a JSP page then after submitting ,it will generate a XML file. How can i do that??? Any help will be highly appriciated. If anybody can give me a good example....
    Thx

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Are you using our XML SQL Utility that comes with the Oracle XDK for Java? Is the correct result produced, but you are having trouble writing it to a file?<HR></BLOCKQUOTE>
    hi steven,
    yes i am using xml sql utility and have solved the problem..... as i was working from a remote system i didnot give the correct path that is the c:\.....etc of the machine i was giving http:// thats why i did not write to a file... now its working

  • Generate an XML file from a DOM tree

    Hi,
    I'm trying to generate an XML file from a DOM tree that I obtained from another XML file with the Xerces library. I used the following operation :
    public static void writeXmlFile(Document doc, String filename) {
    try {
    Source source = new DOMSource(doc);
    File file = new File(filename);
    Result result = new StreamResult(file);
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(source, result);
    } catch (TransformerConfigurationException e) {
    System.err.println(e);
    System.exit(1);
    } catch (TransformerException e) {
    System.err.println(e);
    System.exit(1);
    But I have this Windows/Linux problem. When I execute this on Windows, everything is correct. But if I try on Linux (every distribution does the same thing), I obtain an XML file where everything is written on just ONE LINE : there is neither identation nor carriage return at the end of a line ... And that is pretty annoying 'cause I need to SEE what I generate ...
    Thanks for your answer,
    Blueberryfin.

    Actually I would think that no indents and no new-lines would be more correct, but maybe it's an option for parsers to do it either way if you don't specify it. If you want to specify it, look at this post from last month:
    http://forum.java.sun.com/thread.jsp?forum=34&thread=383400

  • How to generate an XML file from SSIS (based on an XSD)?

    I have an XSD that describes an XML format. I also have a sample XML file as well from the XSD. I am trying to understand SSIS's capability to generate the XML file in an ETL process. I would need to create the XML file based on the XSD that
    I have. It is safe to assume that all the data elements are in the DB that I am incorporating in the ETL and it is also safe to assume that the data in the XML may be from multiple different tables (so massaging is probably necessary). 
    Would this be a job for C#/VB or can I do this through an SSIS process/task? Please help me understand my options. Thanks.

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • How I could generate an XML file from a report in version 4.0B

    Good morning,
    How could I generate an XML file from a report? Please note that I am using version 4.0B
    I don't have access to
    Billy Vital

    Hi,
            In the Class CL_XML_DOCUMENT,
                 we have a method  EXPORT_TO_FILE to download an XML file.

  • My report contains a BLOB (image), why it can't generate an XML file?

    Hi guys,
    I created a report (Purchase Order) and it has a Signature field.
    which is a BLOB column of an image (.JPEG) of the signature of the Purchase Order Approver.
    When i run the report in the report builder its working and it shows the image of the signature.
    BUT when i try to generate xml file to use it for the XML Publisher, it generates an xml file with error. which can't be loaded into the .rtf file.
    i Googled around and it seems that there are limitations in XML Publisher that can not load a BLOB or LONG RAW fields.
    So Please guys i need your help! what can i do now ?
    They need the Purchase Order in a custom PDF format, which i can only make it with XML Publisher.
    Best Regards,

    Hello,
    For questions about BI Publisher (Formelly XML Publisher) :
    BI Publisher
    Regards

  • How to generate an XML file for an animation of IK armature

    Can someone please tell me how to generate an XML file for an animation of IK armature.
    I have a 5 keyframe/16 frame animation of a human character made up of a series of moveiclip symbols that is animated with an IK armature.  I need the XML information from the animation. 
    When I go to Commands > Export Motion XML I get the error message "There is more than one object on frame 1" and then nothing happens.
    Thank you,
    c

    I hope that's not the case.  I want to write to adobe about it.  I think it's a great feature and it functions really well even though it is not a very developed IK tool.  My biggest issue with it is ouput options and integration with motion tweens.
    I have seen a lot of examples of animators using it online, just no one talked about output.  I just feel it hasn't been developed.  It can generate a sprite sheet but only for a single pose frame of the animation, and not all the key frames or pose tweens.  I find that functionality quite odd, as if adobe just forgot about IK when added in sprite sheets, etc. and the reason it half works is just an accident.

  • Unable to generate users.xml file

    Hi All,
    I have installed OCS 10.1.2.0.0.and applied the cumulative patchset and now on OCS 10.1.2.3.0
    Now i am trying to migrate users and their mail box from exchange 5.5 running on Windows NT 4 server.
    I have installed the esmigration tool on a machine running Windows XP SP2, Outlook 2003 client installed. I ran the tool and successfully created the system profile. Once done when i try extract users which should generate a users.xml file, i get an error saying "Unable to generate users.xml" file. When i look at the log file i can see the error which says invalid domain which is not true. The domain name is right and i have repeated the process more than 10 times, but still keep getting the same error. I tried using IMPA to IMAP as well as with MBOX , but still the same error. Has anyone seen such a behavior ?
    So i tried to choose plan B. As i do not have too many users i decided to export the users mail box as a pst file and then import it. This is not a problem, but what i do not know is that what do i need to do to enable coexistence mode on exchange, meaning when an email arrives, it first goes to exchange and then forwards a copy to OCS.Please note on my research i have found some notes on how to do this on exchange 2000 on a windows 2000 server with AD, but i couldn't find anything for Exchange 5.5 on NT4.
    Any assistance on this would be very helpful.
    Regards,
    Dipak

    Hi Dipak,
    If you do the migration from the Windows 2000 machine with outlook 2000 installed, and connected to Exchange 5.5 via an admin profile, then you will not see this issue.
    In case, it is not possible for you to move to new machine where above said environment exists, then you can request for a patch of migration tool that has fix for this issue. Please send an email to [email protected] or [email protected], for the fixed version.
    For your co-existence query: Please make use of alternate-recipient setup that exists on exchange 5.5 user properties. So, the emails will be routed to both exchange, and ocs server mailboxes of that user.
    If you have any further queries please send an email to [email protected]
    Thanks,
    Venkat

  • How do we create generate webservices.xml file?

    Hi all,
    Im new to webservices...
    im able to generate mapping.xml file using wsgenerate
    but i dont know how do we generate webservices.xml.
    Im waiting for ur reply.
    http://tech.groups.yahoo.com/group/completeJava/
    http://tech.groups.yahoo.com/group/completeJava/messages
    http://completejava-group.blogspot.com/

    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)

  • Generate coldfusion xml file

    Hello everyone,
    i've been using cffile > write to create xml files to use
    in my flash.
    i was wondering if i can generate a coldfusion xml-file that
    can be read like a regular xml file by flash eg.
    This way i could read from xml on the fly instead of creating
    and delete xml files each time i need some information...
    Tnx for any help
    Greetz,
    Yannovich

    Tnx hotcfm and Abinidi,
    i'm still nog though this though...
    tnx for any help!
    first i tried reading my cfpage in flash as if it where an
    xml document:
    flash:
    xml_detail=new XML();
    xml_detail.ignoreWhite=true;
    xml_detail.onLoad=do_initxml;
    xml_detail.load("test.cfm?r="+random(65453121564876));
    coldfusion test.cfm:
    <cfoutput>#myXMLer#</cfoutput>
    then i tried and change my code so to use cfxml and a
    variable name:
    flash:
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    var str_xml= result_lv.myXMLer;
    xml_detail=new XML(str_xml);
    t_result.text=str_xml
    gotoAndPlay(_currentframe+1)
    } else {
    t_result.text = "Error connecting to server.";
    var send_lv:LoadVars = new LoadVars();
    send_lv.r = random(12134567864512345)
    send_lv.sendAndLoad("test.cfm", result_lv, "POST");
    coldfusion test.cfm:
    <cfxml variable="myXMLer">
    <inhoud>
    <w id="test" />
    </inhoud>
    </cfxml>

  • How to automatically generate build.xml file in eclipse?

    Hello every body,
    I am learning about ANT. e.g I have writen a very simple programme which displays output "no worries". But how can I compile it with ANT and how can I generate build.xml file using eclipse.

    This is not really a Java issue but rather is an Eclipse issue. You may wish to look for their support sites or forums.

  • Generating large xml files

    i am generating large xml files these are generated using XML Classgen from a DTD, but the since the XML being generated is a large file in 250+ Mb range it invariables runs into memory problems.
    also i need the output to be a single file, so is there anything that can be done.
    Another problem i am facing is the setting the standalone attribute in stored in the <?xml ...?> tag since neither the CGDocument and its CGNode contain to methods to set this
    null

    If the XML is produced from a database query, I'd recommend using the XML SQL Utility's getXMLSAX() method to process XML query results of arbitrarily large size.
    You implement a SAX2 ContentHandler and pass that to the getXMLSAX() method.

  • How to generate a XML file from a XML schema...?

    Hi guys...!
    I have a XML schema and I want to write a XML file based on that schema. I have heard about this feature that eclipse has, which given a XML schema, can generate a XML file for you.
    Does anyone of you know about this feature? or is there another way to do it. The schema that I have is very huge...
    I will really appreciate any help from you guys...
    Thank...you..
    --- Spirit Away...

    don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=649205&tstart=10

  • How generate a XML file & how to save data in that file?

    hi,
    How to generate an xml file & how to add data in that xml file? is there anyone who can help me about this? Firstly i need to open a xml file and after that i need to save user data in that file? how i will do it? What will be the solution of this? please give me solution........
    with regards
    Bina

    With an API like Xerces you can parse an XML document into a DOM tree. You can do modifications on that tree manually and then write it back out as XML data.
    http://xerces.apache.org/xerces2-j/

  • In SAP-XI stop generating of xml files

    Hi,
    In sap-xi i created a simple file to file scenario. After completion
    of end to end scenario the xml files are keep on generating. I have selected delete option in CommunicationChannel. The xml  file from source folder is deleted. Still the taget xml is generating in Destination folder.
    How to stop the generating of xml files
    Any one tell me the solution for this.
    Thanks,
    Ram

    Hi,
    Do the Following,
    1) Make sure that you deleted all the Files present in Source Directory
    2)Select the Processing mode as Delete.
    3)Now Place the File in the Source DIR path
    4)See Whether the file got deleted from the Source or not.
    5) Check the Sender CC in RWB
    6) Check the SXMB_MONI to get the Success Flag.
    7) Check the Receiver CC in RWB.
    8) Check the Receiver Directory whether received the file or not.
    Please check  these one-by-one
    Regards
    Seshagiri

Maybe you are looking for

  • Balance Interest Run F.52

    After running Balance interest in f.52 while posting following error I am facing. "Error when determining accounts to be posted to (posting interface)   Appl Business t CoCo Int.ind.   Bus. Curre Chrt Replace   Status   0004 1000       1000 V1       

  • Using adobe reader x on new iPad w safari

    Just installed newest adobe reader X on my new iPad.  Reader can open and read a PDF file. However, when I try to use the Safari "open with" command to select the adobe reader, it will not open a PDF displayed in the browser.  What am I doing wrong?

  • Set file name as a variable. Then use it to name a folder

    I'm making a workflow that I want to get the selected file, then create a new folder using that file's name. I made a workflow as follows: Get selected Finder Item (In this case a JPG image) Set Value of Variable New Folder (dragging the variable fro

  • Characterstics fields populating in COPA tables

    Hi gurus, I have certain character field like Material Group 1,MG 2,MG 3 ,sales group and Billing document number fields are not poulating in any profitabliity document from last 6-7 month earlier the same is coming in COPA actual posting line item t

  • Call in process VM from new Thread

    Hi! I have a c++-Project that creates a jvm in the main-Thread. Then a new thread is created. In the new thread I'm calling a Java-function ( packageFoo.ClassFoo.fooFunction() in foo.jar). The function (fooFunction) is executed correctly until a poin