Jump to content

Serializing an object to an XML


smitha

Recommended Posts

Hi, I am new to PHP programming. Can you tell me how can I serialize an object to an XML? I found some help online but it is pretty simple with only elements. What I want is to serialize an object into XML with some attributes and some elements. Could you please guide me?

 

Thanks,

Smitha

Link to comment
https://forums.phpfreaks.com/topic/78296-serializing-an-object-to-an-xml/
Share on other sites

Hi, I think I understood what you are pointing to. But I want to write my class in such a way that when I serialize using (PEAR) it would generate required elements as attributes just like what we do in .NET (with an attribute to the property). Can I do that?

 

Thanks,

Smitha

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.