Re: getAttribute()
Brought to you by:
bs_php,
nigelswinson
From: Philipp L. <le...@hi...> - 2002-05-10 00:29:26
|
From: "Nigel Swinson" <nig...@us...> > > DTDs aren't parsed. Have observed that this is a deficiency, wasn't sure > how important it was to our users. Not sure how complex it would be to > parse and use either. > > Comments? > It's nothing critical for me. Of course I validate my XML but usually just in developing the application, writing test data manually and programmatically, and then I have other tools available. I think the top priority is speed (I didn't check out the new debugged 3.0 version yet -- as I mentioned, the older 3.0 failed with my PHP forum -- but I was really happy to hear it's apparently so much faster). Of course it's a tiny problem that e.g. DTD default attribute values (if the attribute is omitted in the XML) aren't understood, because this means I have to replicate those values in the PHP in some way. >.. > I think that the Php.XPath class should stick to returning an unset value if > the attribute is not set. It probably makes for a more useful function. No, somehow I remember it returning an *error* (script ended) when the attribute didn't exist (version 2.2) -- I didn't even get the chance to assign the return value to a variable to check it for being empty/ set (I test on Windows PHP/ PWS). |