SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: xml and php

  1. #1
    SitePoint Guru
    Join Date
    Mar 2006
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xml and php

    I have a large xml file (189 MB) that I want to read and insert to database some values.
    The problem is that I can not read all the file for simplexml (time out).
    How can I read the values of this file?

  2. #2
    SitePoint Addict
    Join Date
    Jan 2007
    Location
    Romania
    Posts
    203
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try increase the value of the max_execution_time and memory_limit configuration entries in php.ini.

  3. #3
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,397
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Probably your best bet would be to work with the XMLReader, saving you from loading the entire XML file into memory.
    Salathe
    Software Developer and PHP Manual Author.


Bookmarks

Posting Permissions

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