DOMIT! RSS provides shortcuts to some of the more common XML methods: hasAttribute, getAttribute, toString, and toNormalizedString. The following is a brief description of these methods. For more information, please consult the DOMIT! documentation.
hasAttribute - tests whether a named attribute exists for the element
$hasId = $rssElement->hasAttribute('id');
getAttribute - gets the value of the named attribute
echo $rssElement->getAttribute('id');
toString - prints out a string representation of the underlying XML node
echo $someElement->toString(true);
toNormalizedString - prints out a nicely formatted string representation of the underlying XML node
echo $someElement->toNormailzedString(true);
|