1 Replies - 2244 Views - Last Post: 20 March 2006 - 04:03 PM Rate Topic: -----

#1 ktsirig  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 94
  • Joined: 14-September 05

simplexml_load_file

Posted 18 March 2006 - 06:33 PM

Hi all!
I seem to have a small problem with this function of simple_xml... Does it apply only in one file each time? I have a big file that consists of small XML files, and when I try to load it using simplexml_load_file, it returns false, because PHP sees the <?xml version....> tag more than once...
Can I do something with this problem?
Is This A Good Question/Topic? 0
  • +

Replies To: simplexml_load_file

#2 DanceInstructor  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 18-March 05

Re: simplexml_load_file

Posted 20 March 2006 - 04:03 PM

Sounds like you will need to open the file some other way ( file(), file_get_contents(), etc ) do some processing and then use simplexml_load_string() once you have the data you want.

Or open the file, parse the data, and write new files for each <?xml version...> section.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1