Should I store HTML in XML or encode it first?
Moderator: General Moderators
Should I store HTML in XML or encode it first?
I'm writing a content system that will use XML for storage. I will be storing HTML, so should I just drop the HTML into XML elements or is that a bad idea and will it affect parsing of the file using simplexml? If it will cause problems, what should I do...base64?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Should I store HTML in XML or encode it first?
If memory serves me correct (I implemented an XML CMS as well) I believe it does cause problems...
I stored the XHTML code as CDATA I think -- try it and find out.
I stored the XHTML code as CDATA I think -- try it and find out.