Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    144

    Unanswered: XML Parser Function

    i am lookin for a function that get a xml file (exported from a excel file) & parse data in it to array in php, if anyon eknows one, plz help.
    tanx

  2. #2
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    How about you head on over to php.net and check out xml_parse and domdocument ?

  3. #3
    Join Date
    May 2004
    Posts
    144
    i checked it out & i wrote a function for my app, but depend on various version of excel or other reasons that i dont know, the xml output is different, & in many cases my function doesnt work correctly, i wonder if a complete function exist that support all cases.

  4. #4
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    What errors is your function giving you. If you are using XML that conforms to standards (which I would imagine excel should output) then there shouldn't be a problem in using something like domdocument. Which PHP version do you have? I suspect your function doesn't work correctly if anything. On php.net you should find some help in the comments section for people whom have worked on recursive parsing of xml using xml_parse();
    It shouldn't matter what is in the XML, if your function works correctly it'll be fine for whatever XML you give it.

Posting Permissions

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