• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Please give suggestion or hint

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 13091
67
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well...have you created the DTD?
 
gyan kumar
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I have created the dtd , based on that I have xml also.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Google for SAX, StAX
 
fred rosenberger
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mr. Ove Lindström.
 
Men call me Jim. Women look past me to this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic