DevShed has posted a new tutorial today that continues their series looking at XML handling with PHP. This time it's a focus on attributes in a CDATA section with DOM.
Since the DOM XML library comes equipped with many other methods that can be useful for adding custom attributes to the existing nodes of a given XML document, and creating new CDATA sections, among other things.
They start with a review of the DOM functionality to get you reacquainted. From there they move off into the createAttribute function and its use in the creation of CDATA elements in your XML.