ID: 28452 User updated by: prof_moriarty at veryfast dot biz Reported By: prof_moriarty at veryfast dot biz Status: Open -Bug Type: Feature/Change Request +Bug Type: Documentation problem Operating System: Win XP PHP Version: 5.0.0RC2 New Comment:
changed category. wrong one. :/ Previous Comments: ------------------------------------------------------------------------ [2004-05-20 07:54:30] prof_moriarty at veryfast dot biz Description: ------------ Forgive me for being obtuse, but i've been staring at the XML documentation for parsing XML files into PHP for what seems like rather too long, and i still havn't got the foggiest what is going on. I'm not a newbie to PHP (been deving with it for 3+ years), but i am new to XML. My problems seem to revolve around the fact that none of the examples are all that clear. There isn't a simple way to parse a file (xml_parse_into_struct is there, but the documentation doesn't actually say anything about what makes the parallel arrays parralel! (i.e. why there are 2 arrays rather than 1). Worst of all is xml_parse. It's not all that clear how to use this function. I know it parses stuff. However it's not made clear what is required for it to be succussful. If i just run: xml_create_parser(args); xml_parse(args); xml_free_parser(args); i get nothing. I doubt i'm supposed to just run those 3, however without being told what to run, what am i supposed to do try every combination of all the xml functions until i get something? :) And before you say it's just me, there are at least 2 comments on the ref-XML page that explicitly how unclear things are, as well as a few others that infer such things. I'll try explaining it another way: Many functions within SE (and hence explanations in the docs), are stand-alone. i.e They don't generally require other functions to work. array functions, string functions, maths functions etc, etc. However for things like XML, MySQL, File handling, dir handling etc, they are all interelated. i.e., i can't use mysql_query, without first using mysql_db_connect and then mysql_db_select. Generally the examples for these inter-related functions are clear, however, i've seen tar that is clearer than the explanations of how to use the XML functions together. :) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28452&edit=1
