Solved

XML Genertor

Posted on 2002-06-27
5
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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:

734 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