Jump to content

SimpleXML - how to add <atom:link> tag?


Mchl

Recommended Posts

I'm working on making my news feed as valid as possible.

One of the W3C recommendations, is to add self reference tag, that look like this

<atom:link href="http://www.site.com/news.xml" rel="self" type="application/rss+xml" />

 

 

I'm trying to do this with SimpleXML, but so far no progress...

 

And after I create a tag like this, how do I add attributes?? (I tried loading an empty tag from string, and then adding attributes, but again nothing)

Link to comment
https://forums.phpfreaks.com/topic/133933-simplexml-how-to-add-tag/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.