Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please give suggestion or hint

 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to solve below problem

write a java code that will use a dtd to create a xml that will contain the marksheet information of student.

Please give hint how should I do it.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12021
25
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried? What do you know how to do? What doesn't make sense?

With such a general question, you can really only expect general answers. so...

Start small.
compile often (every 2-3 lines)
test often
write tons of code you expect to throw away (used for the above item)
figure out the steps on paper before you ever write a line of java
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:What have you tried? What do you know how to do? What doesn't make sense?

With such a general question, you can really only expect general answers. so...

Start small.
compile often (every 2-3 lines)
test often
write tons of code you expect to throw away (used for the above item)
figure out the steps on paper before you ever write a line of java


Thanks for reply.

first I want to create a dtd.
after that I will creeate xml file ( but how) using java and keeping dtd as external dtd?
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12021
25
Chrome Java Linux
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well...have you created the DTD?
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I have created the dtd , based on that I have xml also.
 
AnujS Sharma
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google for SAX, StAX
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12021
25
Chrome Java Linux
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get you to tell us what exactly your problem is. where are you stuck? what don't you know/understand how to do?

Further, i'm trying to help you break down your problem into small, more manageable problems. you started by saying "I don't know how to do this project". after some back and forth, it turns out you do know how to do some of it, but it is still not clear (at least to me) where you are stuck. Each time I ask "Did you do this", you reply with "yes, i know how to do that, and now I'm stuck".

You apparently know how to create a DTD. you apparently know how to create xml. Do you know how to compile a java program? Do you know if you have a JDK? do you know how to run a program once it is compiled?

you need to tell us SPECIFICALLY where you need help.
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know compiling java and runing java program.
classpath,java-home and path is set in my system.

now the question is which is package I should use , and what is the easy way.
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gyan kumar wrote:I know compiling java and runing java program.
classpath,java-home and path is set in my system.

now the question is which is package I should use , and what is the easy way.


Normaly the cube is about 10x9.4x7.199234 inches.

We don't know... do you have a domain registered? Then use that. If not, use something that describes what you are doing.
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ove Lindström wrote:

Normaly the cube is about 10x9.4x7.199234 inches.

We don't know... do you have a domain registered? Then use that. If not, use something that describes what you are doing.

Actually reply was given for Mr. Fred Rosenberger's reply.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12021
25
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you asking about what your package statement should be and how to set up your directories?
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:are you asking about what your package statement should be and how to set up your directories?


yes Mr. Fred Rosenberger.

Will javax.xml package helpful?
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gyan kumar wrote:
Ove Lindström wrote:

Normaly the cube is about 10x9.4x7.199234 inches.

We don't know... do you have a domain registered? Then use that. If not, use something that describes what you are doing.

Actually reply was given for Mr. Fred Rosenberger's reply.


Sorry, I didn't understand that you and Fred was having a private conversation on an open channel.

gyan kumar wrote:
fred rosenberger wrote:are you asking about what your package statement should be and how to set up your directories?


yes Mr. Fred Rosenberger.

Will javax.xml package helpful?


Yes, in javax.xml you find classes that is helpful when working with XML in Java.

However, if you are asking in what package to put YOUR developed files, javax.xml is not the package to use, since that is used by Oracle in the Java API. You may put your files and classes in any package that you like. The commonly used standard is to have a registered domain that you control as base and then add a project or product specific sub-package to it. Under that, there are some patterns that you could use, like have all the specifications (interface and abstract classes) in one package and implementations in another.

I recommend that you take a look at http://java.sun.com/xml/tutorial_intro.html
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mr. Ove Lindström.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic