Their are a couple of options:for example xsl. xsl (which is written in an
xml format) will allow you to format the information the way you want. Newer
versions of Internet Explorer have a DOM parser that will translate your XML
file using XSL with javascript. see www.w3schools.com for examples. If you
want to stick with straight java, I have tried JDOM www.jdom.org though not
extensively. It was a small challege to get their examples to work since
many of the classes they used in the examples are deprecated, however once
you get rolling with jdom it is quite intuitive to use.

T. Kochanowicz


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
karthikeyan
Sent: Friday, August 17, 2001 9:48 AM
To: [EMAIL PROTECTED]
Subject: XML JSP


Hi Guys,

  This is my requirement - i am doing a user search, samle search result is
below :

  Displaying matches 1 through 10

  John
  Matching Criteria: 75% AUSTIN, TX

  Dave
  Matching Criteria: 50% DALLAS, TX

  click-> [1, 2, 3, 4, 5]

 all i need is i should be able to read below xml schema and display the
above result :

<?xml version='1.0'?>
  <SearchResult>
    <ResultHeader>
      <MemberID>12345</MemberID>
      <SearchType>quick</SearchType>
      <Result>success</Result>
      <CurrentPage>5</CurrentPage>
      <TotalPages>10</TotalPages>
    </ResultHeader>
    <ROWSET>
      <ROW num="1">
        <MemberID>100</MemberID>
 <UserName>John</UserName>
 <City> Austin</City>
 <State> TX</State>
 <Score>75</Score>
      </ROW>
      <ROW num="2">
        <MemberID>10001</MemberID>
 <UserName>Dave</UserName>
 <City> DALLAS</City>
 <State>TX</State>
 <Score>50</Score>
      </ROW>
      <ROW num="3">
        <MemberID>1210</MemberID>
 <UserName>Mike</UserName>
 <City> San Diego</City>
 <State> CA</State>
 <Score>50</Score>
      </ROW>
      <!-- Additional Rows -->
    </ROWSET>
  </SearchResult>

  I have xecres.jar and xalan.jar in my classpath.  I saw few example files
but i don't know how to go about it. If you
guys could give me suggestions or sample code which which match the above
requirement i would be grateful.

  Waiting for your earliest reply,

  With Regards,

b.karthikeyan.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to