Info in userdata node in tree xml causes code to break

The tree code cannot handle userdata like this one.


<userdata name="url">http://books.google.com/books?id=WvqG2iUbv3kC&pg=PR10&lpg=PR10&dq=Charles+Journet+Eglise+du+Verbe+Incarne&source=bl&ots=8vVZtQJkTM&sig=pSMKosVwyA5NMW3iJ4KouTs7NCk&hl=en&ei=MadJTcnSN4P58Aaw8rDJDg&sa=X&oi=book_result&ct=result&resnum=9&sqi=2&ved=0CFQQ6AEwCA#v=onepage&q&f=false</userdata>

I want to store urls in userdata to be able to retrieve them in the tree. The code breaks if there are “&” and “=” characters in the url. Do you have a way to get around this?

You should include userdata value into CDATA:

<userdata name="url"><[CDATA[books.google.com/books?id=WvqG2iUbv3kC&pg=PR10&lpg=PR10&dq=Charles+Journet+Eglise+du+Verbe+Incarne&source=bl&ots=8vVZtQJkTM&sig=pSMKosVwyA5NMW3iJ4KouTs7NCk&hl=en&ei=MadJTcnSN4P58Aaw8rDJDg&sa=X&oi=book_result&ct=result&resnum=9&sqi=2&ved=0CFQQ6AEwCA#v=onepage&q&f=false]]></userdata>

This fixed the problem. Thanks.