From:             prof_moriarty at veryfast dot biz
Operating system: Win XP
PHP version:      5.0.0RC2
PHP Bug Type:     Feature/Change Request
Bug description:  XML documentation unclear

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 bug report at http://bugs.php.net/?id=28452&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28452&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28452&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28452&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28452&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28452&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28452&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28452&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28452&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28452&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28452&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28452&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28452&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28452&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28452&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28452&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28452&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28452&r=float

Reply via email to