PHP library for parsing XML with a colons in tag names?

Say you have some xml like this xhtml:div> italic 2010-02-01 06:00 children('xhtml', true)->div->em however if you want the date field, this: $xml->children('xhtml', true)->div->date won't work because you are stuck in the xhtml namespace you must execute 'children' again to get back to the default namespace: $xml->children('xhtml', true)->div->children()->date Namespaces always seem to cause endless problems... If you ask me they are pure architectural flair thrown in to solve a bunch of problems that don't actually exist in the real world.

Say you have some xml like this. Italic 2010-02-01 06:00 You can access 'em' like this: $xml->children('xhtml', true)->div->em; however, if you want the date field, this: $xml->children('xhtml', true)->div->date; won't work, because you are stuck in the xhtml namespace. You must execute 'children' again to get back to the default namespace: $xml->children('xhtml', true)->div->children()->date; Namespaces always seem to cause endless problems... If you ask me they are pure architectural flair thrown in to solve a bunch of problems that don't actually exist in the real world.

1 I have to agree :) – Mark Apr 24 '10 at 5:06 1 not sure why this isn't the selected answer. But for anyone in the future this is the one that solved my questions/problem! :) – daveomcd May 18 at 16:22.

Colon denotes an XML namespace. The DOM has good support for namespaces.

SimpleXML probably does too, but the OP is looking for a tag "xhtml:div" instead of just "div". – Matthew Scharley Oct 16 '09 at 0:15 Ohhh! Didn't realize that was a namespace.In that case, I might be able to get this to work... runs back to the drawing board – Mark Oct 16 '09 at 0:16 SimpleXML has some stuff for dealing with it, but I still can't get it to work right.

– Mark Oct 16 '09 at 1:44.

If you want to fix it quickly do this (I do when I feel lazy): // Will replace : in tags and attributes names with _ allowing easy access $xml = preg_replace('~(.

That's dirty. But good ;) – joedevon yesterday.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions