Atom namespace with php simplexml

shizarp

New Member
This is my RSS template that I load into my simplexml object. I want to change the \[code\]<?xml version="1.0" encoding="utf-8"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <channel> <atom:link href="http://stackoverflow.com/questions/3720408/link" rel="self" type="application/rss+xml" /> <title></title> <link></link> <description></description> <lastBuildDate></lastBuildDate> </channel></rss>\[/code\]I'd like to change the href attribute in atom:link but I have no clue how to access it. I scoured through SO and found a bunch of information on how to access different namespaces but I can't figure out how to apply any of them to this specific example (mostly because I am pretty dense :)I can modify my link attribute with the line of code below but how would I modify the attribute mentioned above?\[code\]$rss->channel->link = $rssLink;\[/code\]Any help would be appreciated!
 
Back
Top