Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit number of records shown in xml

Status
Not open for further replies.

stooee

Programmer
Jul 19, 2005
7
CA
I only want to show the first five records from an external xml file. how is this done? here is the code i am using to display the xml file. Any help would be appreciated.

<XML ID="XMLID" src=" async="false">
</XML>
<table width="75%" border="0" cellpadding="4" datasrc="#XMLID" datafld="channel">
<tr>
<td bgcolor="#336699">
<span class="title"><div datafld="title"></div></span>
<span class="subtitle"><div datafld="description"></div></span>
</td>
</tr>
<tr>
<td>

<table datasrc="#XMLID" datafld="item" width="100%">
<tr class="text">
<td>
<a datasrc="#XMLID" datafld="link"><div datafld="title"></div></a>
<div datafld="pubDate"></div>
</td>
</tr>
</table>

</td>
</tr>
</table>
 
What technology are you using?

Jon

"Asteroids do not concern me, Admiral. I want that ship, not excuses.
 
ASP. Actually I figured it out.

if i use datapagesize="5" within the the <table> tag it will limit the number of records to 5 rows.

unfortunately using data islands the way i did the page only displays properly on IE.

I can't for the life of me get the microsoft.XMLDOM to work to display content from an xml page hosted on another server. I even tried retrieving the page with the XMLHTTP but couldn't get that to work either.

I've gone step by step through so many tutorials my head spun. If the xml page is hosted on my server the microsoft.XMLDOM works fine but as soon as i try to access the page on an external server it stops working.

if you or someone could point me towards a surefire tutorial i would really appreciate it. If not XML might not be the answer i am looking for.
 
This is not an XML question. XML is a structured data storage technology, and that's all.

Displaying the contents of an XML file or object tree is entirely up to the programming language you're using.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top