Any ideas on how to get at the data inside of the cap:geocode and cap:parameter entries?
The key point in your case is, that the XML provided in the other question is invalid.
You would have noticed that if you had followed a good practice in PHP development: Enable reporting of errors, warning and notices to the highest level, display those as well as log those to file. Then track those warnings.
In your case you should have seen some message like:
Warning: simplexml...: namespace error : Namespace prefix cap on event is not defined in /path/to/script.php on line 42
This is a notice that the cap
XML namespace prefix is undefined. That means that SimpleXML will drop it. Those elements are then put into the default namespace of the document so that you can access them directly.
So first of all make yourself comfortable with setting your php.ini file on your development system for development error reporting so that you'll be noticed about unexpected input values. One stop for that is the following question:
Next to that you need to decide why the input is wrong and how you'd like to deal with errors. Should it fail (the design of XML suggest to go with the fail route which is also considered a design issue for XML) or do you want to "repair" the XML or do you want to work with the invalid XML. That decision is up to. SimpleXML does work as announced, it's just in your case you got the error unnoticed and you're not doing any error handling so far.
The same problem with similar XML has been asked/answered about previously: