Solved

Class design on a XML

Posted on 2002-04-30
8
171 Views
Last Modified: 2010-03-31
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT result (target, resultDoc*)>
<!ELEMENT target (#PCDATA)>
<!ELEMENT resultDoc (docID, resultField+)>
<!ELEMENT resultField (fieldName, fieldValue)>
<!ELEMENT fieldName (#PCDATA)>
<!ELEMENT fieldValue (#PCDATA)>


The search result is valid by the DTD above.
I want to lender them to a table structure like below.
------------------------------------------------------
DocID     |        fieldname      |        filedvalue
------------------------------------------------------
DocID1    |        fieldname1     |        filedvalue1
DocID1    |        fieldname2     |        filedvalue2
DocID2    |        fieldname1     |        filedvalue1
DocID2    |        fieldname2     |        filedvalue2
DocID2    |        fieldname2     |        filedvalue2

How can I design java classes which get the String, the search result?
the classes should be used in JSP pages.

Thanks.
0
Comment
Question by:iamjhkang
[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
8 Comments
 
LVL 9

Expert Comment

by:Venci75
ID: 6979915
I would say - try using XSL instead of java - I think it is much better
0
 
LVL 1

Author Comment

by:iamjhkang
ID: 6979930
Definately.

You are right. but for some reasons I need to use Java instead of XSL.

Thanks.
0
 
LVL 1

Author Comment

by:iamjhkang
ID: 6979931
do you think I use Vector type?
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Expert Comment

by:fundoosathish
ID: 6989652
u need an xsl interface so then u can use java efficiently.

bye
sathish
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7082558
Please update/finalize this question... here I am again with the same old requests.
Moondancer - EE Moderator
0
 
LVL 1

Author Comment

by:iamjhkang
ID: 7082681
Would you get me a sample code using XSLT?

Thanks.
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7992721
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ'd and pts refunded
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8048324
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

690 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