868
reputation
5
12

IMSoP

My main presence on this site seems to be correcting people's misunderstandings of PHP's SimpleXML module.

People jump through tortuous hoops, switching to DOM, using XPath, setting LIBXML settings, and 90% of the time, this is because they don't know how to use it, not because it doesn't work.

The top 3:

  • Never print_r() or var_dump() SimpleXML data, or you will be more confused than when you started. I have written some debug functions to use instead.
  • There is nothing wrong with CDATA sections in SimpleXML. Just always cast to string.
  • Namespaces are really easy - just use the ->children() method.
10
answers
0
questions
~23k
people reached

Top tags (21)

Score 38
Posts 2
Posts % 20
Score 27
Posts 1
Score 27
Posts 1
Score 12
Posts 1
Score 12
Posts 1
Score 12
Posts 1

Top posts (10) All Questions Answers | Votes Newest

Badges (17)

Gold

Silver

5

Rarest

Bronze

12

Rarest