Hi

I'd thought of specifying the limit in the request but unfortunately that
option isn't available to me :(

I've just downloaded an xpath class from phpxml.org, looks really kewl, and
i hope it can allow me to do this.

Thanks



Girish


----- Original Message -----
From: "Gerry Kirk" <[EMAIL PROTECTED]>
To: "Girish Nath" <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 8:19 AM
Subject: Re: [PHP] XML Next 25 Results


I think the best approach would be if you could specify in your query the
number of rows you want and the starting row number. In MySQL, you can do
that with LIMIT(row_num, #_rows).

Otherwise, it may be possible to use an XPath function that matches against
the current index of a particular XML element. Are you using XSLT at all?

Gerry

At 07:37 AM 07/08/01 +0100, you wrote:
>Hi Gerry
>
>The XML isn't coming directly from a database, it's coming from an IIS
>server that i query (i generate XML file containing the parameters of the
>query, POST it to the IIS machine, it runs some .ASP to query an inhouse
>database, then POST the XML results back to me)
>
>I then parse the XML to generate a HTML table, however sometimes i may end
>up with a massive table, and i'm trying to find a way to break that table
>into pages of 25 results. However, i'm completely stumped how to do this :(
>
>Regards
>
>
>Girish
>
>--
>
>  function fetchXML($parameters, $request) {
>
>  $appserverIP = "123.456.789.10";
>  $appserverPort = "8080";
>  $appserverPacketSize = "4096";
>  $phpServer = "aeris";
>
>   $header .= "POST /directory/" . $request . " HTTP/1.1\r\n";
>   $header .= "Host: " . $phpServer . "\r\n";
>   $header .= "User-Agent: PHP\r\n";
>   $header .= "Content-type: application/x-www-form-urlencoded\r\n";
>   $header .= "Content-length: " . strlen($parameters)."\r\n";
>   $header .= "Connection: close\r\n\r\n";
>
>   $fp = fsockopen($appserverIP,$appserverPort);
>
>    if ($fp) {
>    fputs($fp, $header . $parameters);
>
>    while (!feof($fp)) {
>    $response .= fgets($fp,$appserverPacketSize);
>    }
>
>    fclose($fp);
>    }
>
>   return cleanXML($response);        // custom function to strip HTTP
>headers from fetched data.
>
>  }
>
>
>
>
>
>----- Original Message -----
>From: "Gerry Kirk" <[EMAIL PROTECTED]>
>To: "Girish Nath" <[EMAIL PROTECTED]>
>Sent: Tuesday, August 07, 2001 5:22 AM
>Subject: Re: [PHP] XML Next 25 Results
>
>
>Hello Girish,
>
>I can't help you with your problem, as I am just getting acquainted with
>XML myself. I've been doing some research to assess the feasibility of
>using PHP and XML for a web-based database-driven application.
>
>If you don't mind, could you share with me how you are using XML? Are you
>retrieving / querying / storing data from a database?
>
>Thanks,
>Gerry Kirk
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to