Checks whether the named attribute exists. |
Signature: hasAttribute($attr) |
Parameters:
String attr - The attribute name.
|
Returns:
boolean - True if the attribute exists.
|
Example:
Tests whether the named attribute exists. $doesTitleExist = $someRSSElement->hasAttribute('title'); |
Tests whether the named element is predefined by the RSS spec. |
Signature: isRSSDefined($elementName) |
Parameters:
String attr - The element name.
|
Returns:
boolean - True if the element is predefined by the RSS spec.
|
Example:
Tests whether the named element is predefined by the RSS spec. $isRSS = $channelElement->isRSSDefined('title'); |
Tests whether the named element has a single child text node. |
Signature: isSimpleRSSElement($elementName) |
Parameters:
String attr - The element name.
|
Returns:
boolean - True if the named element has a single child text node.
|
Example:
Tests whether the named element has a single child text node. $isSimple = $channelElement->isSimpleRSSElement('copyright'); |
Generates an unformatted (single line, no whitespace) string representation of the rss element or document and all children. |
Signature: toString($htmlSafe = false, $subEntities=false) |
Parameters:
boolean htmlSafe - If true, returns an html formatted representation of the string.
boolean subEntities - True if illegal xml characters in text nodes and attributes should be converted to entities.
|
Returns:
String - An unformatted (single line, no whitespace) string representation of the document and all children.
|
Example:
An unformatted string representation of the rss document will be printed here: echo $myRSSDoc->toString(true); |