Quantcast
Channel: WordPress.org Forums
Viewing all articles
Browse latest Browse all 46187

ddsuresh on "[Plugin: WP-Property - WordPress Powered Real Estate and Property Management] How to create attribut"

$
0
0

I am preparing my own xml feed for one client. I want to add attributes to output xml feed.

<images>
<photo id="1">
<url>http://www.xyz.com/wp-content/uploads/wpp_import_files/1/1683/739192434.jpg</url>
</photo>
</images>

in array, i have passed like below code, but it doesn't work

$images['photo'] = array('@attributes'= array('id'=>'1'));
$images['photo']['url'] = 'http://www.xyz.com/wp-content/uploads/wpp_import_files/1/1683/739192434.jpg';

But output comes in below wrong xml format

<images>
<photo>
<property>
<id>1</id>
</property>
<url>http://www.xyz.com/wp-content/uploads/wpp_import_files/1/1683/739192434.jpg</url>
</photo>
</images>

Any ideas how to add attributes?

http://wordpress.org/extend/plugins/wp-property/


Viewing all articles
Browse latest Browse all 46187

Latest Images

Trending Articles



Latest Images