Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    xml_parse $data chunk size

    Is there any restrictions on the size of $data passed to xml_parse()? All the tutorials I see parse an XML file by making repeated calls with the next 4096 bytes each time. Is this just convention, or is there a reason for it?

    I'd much rather just dump the entire file in one call to xml_parse using file_get_contents. Much simpler.

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    http://www.php.net/function.xml_parse doesnt say there is a limit to hw much u can parse

  • #3
    New Coder
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Which is why I asked here. It seems pretty arbritrary to use 4096, but I presumed there was a reason.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •