Solved

XML Genertor

Posted on 2002-06-27
5
203 Views
Last Modified: 2010-07-27
Dear experts,

I need help from you to create a web/client application (either use swing or AWT) to generate an XML document that based on the information the user input. When the user clicks the "Create XML" button after the user input info such as XML version, Project Name, Command Name, Parameter Names etc., the application will automaticly generate an XML file looks like below:

<?xml version="1.0"?>
     <project name="LogViewer Application">
          <command name="Login">
                    <target name="success">/Disclaimer.jsp</target>
                    <target name="fail">/Login.jsp</target>
                    <requestparameter get="true" set="false" name="iv-user">java.lang.String</requestparameter>
                    <requestparameter get="true" set="false" name="pwd">java.lang.String</requestparameter>
                    <requestparameter get="false" set="true" name="errorMsg">java.lang.String</requestparameter>
         </command>
         <command name="LogList">
                   <target name="success">/LogList.jsp</target>
                   <target name="fail">/Error.jsp</target>
                   <requestparameter get="true" set="false" name="logDir">java.lang.String</requestparameter>
                   <requestparameter get="true" set="false" name="logRootName">java.lang.String</requestparameter>
                   <requestparameter get="false" set="true" name="logList">java.util.Vector</requestparameter>
                   <requestparameter get="true" set="false" name="sortKey">java.lang.String</requestparameter>
                   <requestparameter get="true" set="false" name="sortOrder">java.lang.String</requestparameter>
                   <requestparameter get="true" set="false" name="fileName">java.lang.String</requestparameter>
                   <requestparameter get="false" set="true" name="javax.servlet.jsp.jspException">java.lang.Exception</requestparameter>
          </command>
</project>

Thanks!
0
Comment
Question by:Amy01
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:Calron
ID: 7115987
To create your XML you could use DOM to create the structure in memory. Have a look at the following links for help on DOM:

What DOM is and how to use it:
http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPDOM.html#66050

creating your own DOM:
http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPDOM7.html
0
 

Author Comment

by:Amy01
ID: 7116268
I'm new to Java. I need code to help in detail.
0
 
LVL 5

Expert Comment

by:Calron
ID: 7118218
Sorry, I don't have the time to write the whole thing. This forum is for help when you get stuck. For writing java apps have a look under:

http://java.sun.com/docs/books/tutorial/


good luck
0
 

Author Comment

by:Amy01
ID: 7122100
I can't run these java apps examples. Could you please tell me how to create a "About Box" item and make the Dialog open when the user selects it from the "Help" menu. Example code please.
0
 
LVL 5

Accepted Solution

by:
Calron earned 150 total points
ID: 7123879
I can help you along, but you still have to do the programming yourself.

First: do you aim to write an applet or an application, that decides on how you begin, either you start your class extending a JApplet or JFrame:



public class MyClass extends JApplet {
  // this would be for an applet
}

Look at  http://java.sun.com/docs/books/tutorial/   for help on creating an Applet or application
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question