Re: calculate xml size
| From: | Tijnema | Date: | Sat, 26 May 2007 18:05:12 +0000 |
| Subject: | Re: calculate xml size | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255687@lists.php.net to get a copy of this message | ||
On 5/26/07, Vo, Lance <lvo@ibsys.com> wrote:
does php has any function that calculate a xml element in bytes or anything: example: <tests> <test1>ABC</test1> <test2>DEF</test2> </tests> If I want to calculate element <test1>, it should return 18 bytes. thanks LanceI have nearly no experience with XML parser in PHP, but it doesn't look like this function exists. However, you could call xml_get_current_byte_index [1] once, then read the element, and call it again, and the difference should be what you're looking for. Tijnema [1] www.php.net/xml_get_current_byte_index