PHP, Web Programming

Issues with extending SimpleXML

<![CDATA[I wrote a post about my attempts to extend SimpleXML to support microformats. Well it’s not as it easy as it seems.

You can’t define new properties of a class extending SimpleXMLElement. Well you can define them but they don’t work – when you access them they always return a SimpleXMLElement object (or actually an object of whatever class you defined).

I’ve tried overriding __get and __set and neither work so the only thing I can think of is to create a new class that delegates most of it’s work to SimpleXMLElement.

PHP, PHP5, SimpleXML, OOP, microformats, hReview, hCard, hCalendar]]>

2 thoughts on “Issues with extending SimpleXML

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s