Solved

XML Genertor

Posted on 2002-06-27
5
205 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet filter example 37 71
JAVA API design with micro service cloud in mind 1 46
Is there a simpler dropbox system? 10 34
learn programming 8 39
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

856 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