Re: calculate xml size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/26/07, Vo, Lance <lvo@xxxxxxxxx> 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

Lance


I 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux