Solved

XML Genertor

Posted on 2002-06-27
5
201 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
Comment Utility
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
Comment Utility
I'm new to Java. I need code to help in detail.
0
 
LVL 5

Expert Comment

by:Calron
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
pairstar challenge 2 41
Which is the latest version of Apache Tomcatl 3 35
JDeveloper 12c for 32 bit 4 34
Java DateChooser? 2 0
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now