4 messages in com.googlegroups.bloggerdev[bloggerDev] Re: must be terminated b...| From | Sent On | Attachments |
|---|---|---|
| Benedict | 28 Jul 2008 01:37 | |
| Trevor Johns | 28 Jul 2008 01:46 | |
| Benedict | 28 Jul 2008 01:53 | |
| Trevor Johns | 28 Jul 2008 02:00 |
| Subject: | [bloggerDev] Re: must be terminated by the matching end-tag![]() |
|---|---|
| From: | Trevor Johns (tjo...@google.com) |
| Date: | 07/28/2008 01:46:43 AM |
| List: | com.googlegroups.bloggerdev |
Hi Benedict, I suggest looking at Tidy. It's a very useful program that will fix up these sorts of errors automatically (plus a lot of other useful features). There's even a PHP binding, so you can call it directly from your code.
http://tidy.sourceforge.net/ http://php.net/tidy
-- Trevor Johns
On 7/28/08, Benedict <bene...@gmail.com> wrote:
Hi, uhmm.. Im trying to do crossposting from wordpress to blogger using gdata blogger api, but once I've send my request, an error like this appears.
"The element type "img" must be terminated by the matching end-tag "</img>""
I am aware that the fix to this is to place a '/' at the end of the image tag. but is there another way to fix this?
What I am doing is that I am trying to crosspost after I've published a new post from wordpress. Aside from doing this
i can do this code to fix my content $content = preg_replace ("/<img(.*)>/sU","<img\\1/>",$content);
but what if there are still other unterminated tags? I cant do preg_replace for every existing unterminated tags because It will slow down my crossposting process.
btw. this is the example of my xml
<entry xmlns='http://www.w3.org/2005/Atom'> <title type='text'>$title</title> <content type='xhtml'> $content </content> </entry>"
its content type is xhtml, I've also tried content type html and text and it returns a different error. It doesnt recognize my other tags such as 'p' etc...
Can you guys suggest any fix?
Thanks.. Benedict
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Blogger Data API" group.
To post to this group, send email to blog...@googlegroups.com
To unsubscribe from this group, send email to
blog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bloggerDev?hl=en
-~----------~----~----~----~------~----~------~--~---




