Constructor.
JFeedParser
__construct
(XMLReader $stream)
-
XMLReader
$stream: The XMLReader stream object for the feed.
Method to get a namespace object for a given namespace prefix.
mixed
fetchNamespace
(string $prefix)
-
string
$prefix: The XML prefix for which to fetch the namespace object.
Method to initialise the feed for parsing. If child parsers need to detect versions or other such things this is where you'll want to implement that logic.
void
initialise
()
Redefined in descendants as:
-
JFeedParserAtom::initialise()
: Method to initialise the feed for parsing. Here we detect the version and advance the stream reader so that it is ready to parse feed elements.
-
JFeedParserRss::initialise()
: Method to initialise the feed for parsing. Here we detect the version and advance the stream reader so that it is ready to parse feed elements.
Method to move the stream parser to the closing XML node of the current element.
void
moveToClosingElement
()
Method to move the stream parser to the next XML element node.
boolean
moveToNextElement
([string $name = null])
-
string
$name: The name of the element for which to move the stream forward until is found.
Method to parse the feed into a JFeed object.
Method to parse a specific feed element.
void
processElement
(
JFeed $feed,
SimpleXMLElement $el,
array $namespaces)
-
JFeed
$feed: The JFeed object being built from the parsed feed.
-
SimpleXMLElement
$el: The current XML element object to handle.
-
array
$namespaces: The array of relevant namespace objects to process for the element.
Method to register a namespace handler object.
-
string
$prefix: The XML namespace prefix for which to register the namespace object.
-
JFeedParserNamespace
$namespace: The namespace object to register.