Save GUI components in a XML format

I am looking for a technoology that can help to create a my own file format using java. That mean currently im working with implementing a mind mapping tool (like mindjet) which will help to do basic mind mapping actions like add, edit, delete topics.
But I have faced for a ig problem when im saving a created map. because it should save as a new file format and should be able to re-open for editing.
What I planned is to retrive the GUI component's(elements of the map) properties from the map and write those values to the XML file(using XML DOM or SAX). Then read those saved values and create the GUI components under retrieved data.
what I want to know is that. Is my approach is correct? or is there any better solution for this matter?
please clarify me and I would really appreciate your help?
Regards
Lakshitha Ranasinghe

You presumably have some state, in memory, that you want to persist. From your post, though I must confess that the terms you use are not really clear in terms of what type of data you actually want to say, my guess is that you have some graph of objects in memory that you have parsed that you want to serialize and persist and then later deserialize and restore for reuse in a subsequent execution of your program.
If yes, then your goal is really simple: how do I save the state of my application and then restore it?
Go to the filesystem: store as a properties file (key-value pairs), Java's default serialization, XML or a totally custom format
Go do the database: map your object to a proper database table and column (via JDBC or an O/R mapper ala Hibernate), or store what you would have stored in the filesystem in a databaseXML is a valid option. So is a simple properties file. It depends on your requirements. If you are reading from and writing to a Java application, and frequent versioning is not an issue, then Java's default serialization could be a possibility. Going to the database would be the 'enterprise' solution, but requires testing and the successful functioning and communication between two technologies and machines. It depends on your requirements.
- Saish

Similar Messages

  • How do i save a JTextPane's content XML-formated?

    I want to save a JTextPane's content XML-formated and also want to read the content from a stored XML-file back.
    Does anybody know a solution?
    Thanks in advance for your help!

    You will need to write the XML output yourself and use either SAX or DOM and an XML parser ( such as xerces from Apache ) to read the XML file back in.

  • XML as datasource in GUI components framework

    Hi all,
    I'm looking for a framework to use XML data as datasouce to GUI components like Swing ones. I've investigated SwingLabs but in it XML databinding namely is under process now. Can anyone suggest something on the subject?
    WBR, Max

    if there are few data use odbc directly to the xml...
    but the best way is to put them in a relational Db
    i hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • Report to Save data in XML format

    Hi,
    I am getting data in XML format through a RFC. I want this data to be saved as an XML file by opening a 'Save As' dialog box so that I can choose a destination and save the file there. Please provide me code for writing such a report program. It would be better if someone can provide me the area in SAP Help where I can find such material.
    Thanks in advance!!
    Regards,
    Saurabh

    Hi,
    Use the class cl_gui_frontend_services.
    For more info please see this.
    save_dialog func module
    Cheers
    Vinod

  • How can i save a AWR/statspack report in xml format ??

    how can i save a AWR/statspack report in xml format ?? or is there a way...coz when creating the report it gives option for html or normal (sql or txt based file)... on 10.2.0.3

    thanks orinet....i used wat you asked me to use...it generated a .dmp file....
    sqlplus "/as sysdba"
    SQL> @$ORACLE_HOME/rdbms/admin/awrextr.sql
    i tired upload that file to orapert.com it gives me below error ...any reason why ??
    Error : File not processed because it was too small to be an Oracle statspack or bstat/estat file.
    do i need to load it up too ?? as i tried doing the below
    sqlplus "/as sysdba"
    SQL>@$ORACLE_HOME/rdbms/admin/awrload.sql
    get error while doing that....
    ERROR at line 1:
    ORA-20105: unable to move AWR data to SYS
    ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 1760
    ORA-20107: not allowed to move AWR data for local dbid
    ORA-06512: at line 3
    the file is about 19M in size
    Edited by: user630084 on Mar 19, 2009 11:37 AM

  • Deliver a report in XML format and save it to local file system on the server

    We have OBIEE 10.1.3.4 on Redhat linux. We want to have generate a report in XML format and saved it to the server's file system. Did not realize this is s difficult task. Basically
    1) How to create a XML report? It is not listed in the output items of a layout template.
    2) How to deliver XML the report  to local file system. Look into the Delivery section of Admin page. FTP should be the best choice, but does that means that one need to install and run ftp server on the BI server box?
    Thanks

    Hi,
    Since I still have problems on this subject, I would like to share on how it progresses.
    Currently I have a problem of timeout in step "Truncate XML Schema" with the URL that I mentioned above.
    The exact error is the following : 7000 : null : com.sunopsis.sql.l: Oracle Data Integrator TimeOut : connection with URL [...]
    The connection test is still OK.
    I tried to increase the value in the user's pref but there's no change.

  • How to SaveAs the MSword file into xml file format using Java APIS?

    Hello all,
    I want to convert MSword file into Xml format using java APIS or any other inbuilt APIS that i can integrate in Java code.

    Sorry, that doesn't make much sense.
    The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
    Are you a user of this utility?

  • Using XMLencoder/decoder to save GUI -- why?

    In my last project, I spent a good deal of time writing functions to save and load a project to a local XML file with my own XML format (I was not using Java for this project).
    I just began looking into XMLEncoder and XMLDecoder and I wrote a simple application which works nicely.
    So my question is, when would you save out a GUI component or the entire GUI to an XML file?
    I saw an example of this here: http://java.sun.com/products/jfc/tsc/articles/persistence3/Browse.xml
    If you read in this XML file using XMLDecoder it will actually launch the GUI. This is pretty neat, but in what scenario would you use this? Would this be used to save the state of components so I do not have to for instance populate lists, tables, etc?
    Would you save out the whole GUI or just certain components???
    Thanks

    I wouldnt ever do it. Just because I think its overkill. XMLEncoding JavaBean objects is a great way of persisting the state of certain aspects of an app but I cant see the point of saving the whole GUI. Maybe if you wanted to persist particular layouts of components within the UI, you might use this. Then these layouts could be reloaded in within without recompilation of the code. But this is pretty sick and I would avoid it if possible.
    Jim

  • XML format for Acrobat JavaScript

    Hi,
    This is my first posting to any Adobe forum, so please bear with me...
    I'm interested in the XML format for Acrobat JavaScript.  I'll be using an external editor (UltraEdit).  When I do (in Acrobat 8) Advanced-->Document Processing-->Edit All JavaScripts, UltraEdit starts off with this:
    //-----------------Do not edit the XML tags--------------------
    Interesting, but not very useful.  If I look at some existing PDF files containing JavaScript, I see things like:
    //-----------------Do not edit the XML tags--------------------
    //<Document-Level>
    //<ACRO_source>DocOpen</ACRO_source>
    //<ACRO_script>
    /*********** belongs to: Document-Level:DocOpen ***********/
    OK, this is better.  In fact, if I look at enough existing PDF files containing JavaScript, I could probably figure out the XML format by myself, including the XML format of tags like <Page-Actions>,  <AcroForm>, etc.  However, it would be far easier to get the specification of the JavaScript XML format -- for example, what is the format of the text following the "belongs to:" string within the various types of XML tags?
    I *presume* this is documented somewhere but I couldn't find it.  If someone has the Acrobat JavaScript XML format specification, it would be greatly appreciated.
    Thanks.
    Dave
    P.S. Another possible approach would be to create JavaScripts myself using Advanced-->Document Processing-->Document JavaScripts, and then see what XML is created based on the code I enter into the GUI, e.g. form code, functions, etc. This also seems somewhat inefficient, presuming again that the JavaScript XML format is already documented.

    Thanks for the additional information.
    I played with JavaScript some more, using my preferred editor, UltraEdit, which I attached to Acrobat.  I thought I would be able to take a JavaScript program from one PDF file (source file) and do a copy & paste into another PDF file (destination file).  While I can do the paste (again, via UltraEdit) into the destination file and can do an UltraEdit Save, when I go back into UltraEdit via Advanced --> Document Processing --> Edit All JavaScripts, the JavaScript I pasted from the source file to the destination file isn't there in the destination file.
    From this, I concluded that I'll need to create the Document-level JavaScript and the form field Javascripts (e.g. a JavaScript triggered by a "Mouse Down" in a button) via the Acrobat GUI's.  Acrobat doesn't seem to like it if I bypass the GUIs and just attempt to paste the code directly into the PDF file via an editor.  By not using the GUI and just doing the cut & paste as I did, I'm probably missing some part of the code setup/creation process that Acrobat needs to know about.
    This is why I originally asked about the syntax for the pseudo-XML, thinking I could just copy the pseudo-XML/JavaScript code from one PDF file to another, and then modify the code to reflect the needs of the destination PDF.  Now I understand the need you mentioned to use the Acrobat GUIs to set up the initial XML/JavaScript structure.
    Once I have the XML structure set up in the destination file (e.g. a JavaScript triggered by a "Mouse Down" in a button), I can obviously copy code snippets into that <AcroForm> sections, I just can't *create* the original "Mouse Down" <AcroForm> sections via the editor.
    Another approach I could follow would be to make a copy of the original source file and change the name of the copy to the desired destination file name, and then start modifying the code in the new (destination) file -- presuming that's the easiest path to get the desired functionality created.  This way, I wouldn't have to manually (via the Acrobat GUI) create all of the <Document-Level> and <AcroForm> sections.
    Thanks for your (and others') help, let me know if I'm missing anything.
    Dave

  • Convert PDF to XML Format . Can´t get it working :(

    Hi everybody,
    I am a Rocky in Acrobat Scriptingand I need some helpd to convert a PDF file into an XML format using the build in javascript console.
    The only thing I got so far is:
    this.saveAs("/e/test.xml","com.adobe.acrobat.xml-1-00")
    I got this information from the refrence guide, but I did not find an accurate example. Can you lend me a hand ? If you find a solution can you also explain me the different sections of the code because I still want to learn something besides using the copy and paste option.
    Thank you very much:
    Roland

    Bernd Alheit wrote:
    What happens when you try it?
    The problem is I tried it several times, but nothing happens at all.  The reference guide mentioned a second file with the ending *.xls will be created but nothing happens at all. Can you help me out ?

  • RFBELJ10 output in XML format

    Hi,
    We have a requirement in Italy to have the document journal output created in XML format. As we all know, SAP does not have such option in this report. Is there anything that we could do to get the outputs in either XML or PDF formats and save the files locally or on the application server so that we could submit it to Italian Government?
    Thank you,
    Subash Krishna

    Hi,
    above is not fiscal requirement.
    If it is fiscal requirement then please provide me a legal documentaion web link.
    Reg
    Madhu M

  • SAPgui.exe is running even after closing the GUI components

    Hello All,
    Even after closing the SAP GUI components like Bex, WAD or RSA1 etc... i am able to see these processes are running under the Task Manager--> Processes....
    even if i try to restart the system, error messages are occuring...saying that SAP is still opend...
    Why it is happening, any ideas?
    Thanks,
    Ravi

    Hi Dirk,
    Thanks for your infomation. Infact, apart from this problem, i have the problem with saving the webtemplate. As it is taking much time to save a template after modifications, i had to terminate the wad process. It seems above 2 problems are related....any ideas?
    Thanks
    ravi
    Message was edited by: Ravi Pasumarty

  • Oracle Report show in XML Format

    Hi to all
    I designed one report in oracle EBS R12 and attach one XML Template for output.This report output show properly but when i add this report in Request Set then its output show in XML format instead of attach template.
    If any member have its solution so plz send it.
    Regards ,
    Zulqarnain

    Hi Zulqarnain,
    You have missing some information.
    1. First create report in Report Builder.
    2. Generate report in XML format.
    3. Now using BI Publisher import XML format report.
    4. Add required columns in MS Word with Add in options.
    5. Now Save MS File with format rtf.
    6. Now using XML Publisher Administrator report add information regarding report information and upload rtf file.
    Have enjoy
    Edited by: 877432 on Dec 30, 2012 8:15 PM

  • Report output in XML format

    Is it possible to save (or export) report output in XML format, it is ok with either WebI or DeskI report, here we are concerned about output format not what type of report we can use to produce the output in XML format.
    Thank you,
    Srini

    Hi Srinivas,
    Only options available in WEBI or DESKI is to save documents in Excel or PDF format.
    As a workaround you can use Excel as an intermediate between your WEBI or DESKI document to XML format.
    When you try to save WEBI document in XML Data format you may get following Error because the Excel sheet does not contain any XML format that requires.
    u201CCan Not save XML data because the workbook does not contain any XML mappingsu201D
    Solution:
    1. Excel cannot save all or part of your workbook as XML Data if you have not created one or more mapped ranges.
    2. If you haven't added an XML map to your workbook, or your data is not contained within an XML list, then you can save your workbook in the XML Spreadsheet file format.
    If you have added an XML map to your workbook, follow these steps to map XML elements to your worksheet:
    1. On the Data menu, point to XML, and then click XML Source to open the XML Source task pane.
    2. To map one or more elements to your worksheet, select the elements in the XML Source task pane. To select nonadjacent elements, click one element, and then hold down CTRL and click each element.
    3. Drag the selected elements to the worksheet location where you want them to appear.
    I Hope this helps to find  the path of solution with Ease.
    Thanks...
    Pratik

  • Flyweight Pattern use with multiple GUI components

    Hi,
    I am creating a simple application and I would like your advice on wether I should use the flyweight pattern or not.
    My application is essentially a GUI front to a repository of small images. The GUI (in its simplest form) is a single window that will display all the images with their names in a clickable thumbnail format. The user will be able to select an thumbnail icon, drag it and move it around pretty much like the icons on your computer desktop.
    The easiest way to do that is probably to load each image and its name into a JLabel, add it in a JFrame and write just few lines of code (say by extending the JLabel class) to handle mouse pressed/dragged events in order to move the label around. The rest will be taken care of by the swing functinality (e.g. painting etc).
    However, I am considering using the flyweight pattern for efficiency but I am not sure if it is appropriate. So far I have seen simplistic examples of its use (apart from JTree) where the pattern is used to paint dozens of lines on the screen or the borders of components. But what happens if instead of lines or borders the objects in question are interactive GUI components such as my thumbnails? how does the flyweight pattern work in this case?
    For example if I create just a single JLabel and use it to paint all my icons that's great! but what happens with mouse events? what happens when I want to drag a thumbnail over another one and how the partial repainting of the thumbnail below should be handled?
    Am I missing something here, or in order to implement the flyiweight pattern in this case I will have to write endless lines of code to replicate the functionality that swing arleady provides in each JComponent? (e.g. targetting of mouse events, repainting etc)
    Cheers,
    Kyri

    I don't think Flyweight applies, because you really don't want to share any UI component that generates events unless the response is the same for all of them.
    If you read Flyweight, I think it was intended for things like caching the first 128 Integers, etc. - think finite, countable, immutable things. I don't think UI elements apply.
    %

Maybe you are looking for