Re: [PHP-XML-DEV] Can SimpleXML still return all namespaces?
[email protected] (Ben Schmidt) Tue, 31 Jul 2007 03:22:15 +1000
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
> http://doc.php.net/php/dochowto/ Yikes! There's a lot of that. I'll take a more thorough look later. >>> So what you are proposing is just a way to be able to work with >>> SimpleXML in a completely namespace ignorant way? >>> Basically, ignore all namespaces/prefixes and work directly with >>> local names only? >> > I am looking into this. I tossed this idea around with a few others and > they also agree it might be a good idea to allow this type of > functionality (though it would *NOT* be the default behavior. You would > need to enable it via some parameter when working with SimpleXML). Still > thinking about the implementation for this. Sounds great. >> 2. There should be a way to get the current scope of a >> SimpleXMLElement. > getNamespaces() - though this will also add namespaces from attributes > as well - but again if working with complex documents, SimpleXML alone > might be the wrong choice - you can mix DOM and SimpleXML without the > overhead of having to copy documents. getNamespaces() doesn't do what I want. I am not interested in finding out what namespaces are in scope/used in the XML document per se, but what namespace scope SimpleXML is in for the object in question. I.e. what namespace will it be searching for if you use -> or [] notation? Please, please, please introduce this one, as with this small amount of functionality, pretty much everything else that I want can be done by subclassing SimpleXMLElement/going back to DOM (both amazingly great features you guys have added; very insightful). This little piece of internal state that SimpleXML has is so important, it needs to be accessible. Cheers, Ben. Send instant messages to your online friends http://au.messenger.yahoo.com