Stripping out "<" and ">" while creating an xml file
Posted: Wed Dec 28, 2011 6:46 pm
Couldn't think of any other way to phrase it - sorry....
Anyway, I'm extracting data from WordPress Databases and creating an xml file. I use str_replace() to strip out the embedded characters such as the '<!--> more>' or the '<strong>' etc and everything is working well.
Except when the post contains an embedded image, at that point the only common characters seem to be '<img class=> and a '/>' to mark the end, I've searched for wild card usage when replacing a string, but I can't seem to find anything out there.
If someone has any ideas or could point me in the right direction, I'd appreciate it.
Thanks
Anyway, I'm extracting data from WordPress Databases and creating an xml file. I use str_replace() to strip out the embedded characters such as the '<!--> more>' or the '<strong>' etc and everything is working well.
Except when the post contains an embedded image, at that point the only common characters seem to be '<img class=> and a '/>' to mark the end, I've searched for wild card usage when replacing a string, but I can't seem to find anything out there.
If someone has any ideas or could point me in the right direction, I'd appreciate it.
Thanks