File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Navigation of XML records Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Navigation of XML records " Watch "Navigation of XML records " New topic

Navigation of XML records

Mamta Katamneni

Joined: Nov 18, 2004
Posts: 1
I am trying for providing navigation for records like the way provided int the following examle.

but my xml file is not in the standard format. It looks like

<Form name="ADDRCHG" description="Address Change Form">
<Element name="FirstName" value="S">
<Element name="LastName" value="B">
<Element name="NewAddressLine1" value="1234 some street">
<Form name="ContactUsNPF" description="Contact US Form for NPF">
<Element name="FirstName" value="S">
<Element name="LastName" value="B">
<Element name="Question" value="Hey, how do I use your site?">
<Form name="ContactUsBTF" description="Contact US Form for BTF">
<Element name="FirstName" value="S">
<Element name="LastName" value="B">

i used XSL to display the records in HTML format and everything works fine. my XSL looks like

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="">
<xsl:template match="/">

<h1>Forms Details:</h1>
<table border="0" cellpadding="2">

<xsl:for-each select="FormData/Form">
<xsl:value-of select="@description"/>
<xsl:for-each select="Element">
<td> <xsl:value-of select="@name" />:
<xsl:value-of select="@value" /> </td>


with this one i am able to display the entire data in a single page. But i want to place buttons at the bottom of XSL file and provide navaigation like MovePrevious, MoveNext, with one record in each page. As my XML is not in the standard format i couldn't use the code provided in the example. Could someone please help me.

Thanks in advance.
[ November 18, 2004: Message edited by: Mamta Katamnent ]
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Welcome to Javaranch.

Well, I have to say, that one superb example. I am impressed with this example and would love to learn more. That said, I can't find any explanation of what this example does or what technology it uses.

As for my part, I am not good in Javascript and so I don't understand what the xmldso thingy (object?) does. Do you have a link/page where they explain the example.

I have a strange feeling this is something to do with the Microsoft technology (.asp?). Its not just simple XSLT thing.

- m
[ November 19, 2004: Message edited by: Madhav Lakkapragada ]

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Navigation of XML records
jQuery in Action, 3rd edition