Xml
class Xml extends AbstractParser (View source)
The core parser for all XML content.
Traits
DOMDocument
objects.
Properties
protected DOMDocument | $domDocument | The DOMDocument object which is being used to parse the content. | from DomDocumentTrait |
protected LoggerInterface | $logger | A PSR-3 logger. | from LoggerTrait |
protected string | $rawDocument | The raw, unparsed contents of the feed's stream. | from RawDocumentTrait |
protected Feed | $feed | The object which contains the parsed results. | |
protected int | $libxml | Bitwise libxml options to use for parsing XML. | |
protected HandlerStackInterface | $middleware | The handler stack which contains registered middleware. | |
protected Ns | $ns | The XML namespace handler. |
Methods
Gets the DOMDocument object which is being used to parse the content.
Retrieves the raw, unparsed contents of the feed's stream.
Constructs a new instance of this class.
Get the preferred namespace alias.
Gets a reference to the DOMXPath
object, with the default namespace
already registered.
Some DOMNode names are #comment
or #text
. This method will move the
pointer to the next node, then the next until it finds a real XML node.
Details
in AbstractParser at line 28
string
__toString()
Returns an opaque string representing the object.
Note: Use of MD5 here is not cryptographically significant.
in AbstractParser at line 41
string
readStream(StreamInterface $stream)
Reads the contents of the stream resource.
in DomDocumentTrait at line 30
DOMDocument
getDomDocument()
Gets the DOMDocument object which is being used to parse the content.
in LoggerTrait at line 35
LoggerTrait
setLogger(LoggerInterface $logger)
Sets the PSR-3 logger.
in LoggerTrait at line 52
LoggerInterface
getLogger()
Retrieves the PSR-3 logger.
in RawDocumentTrait at line 28
string
getRawDocument()
Retrieves the raw, unparsed contents of the feed's stream.
at line 83
__construct(StreamInterface $stream, LoggerInterface $logger, HandlerStackInterface $handlerStack, int $libxml, bool $handleHtmlEntitiesInXml)
Constructs a new instance of this class.
at line 181
string|null
getNamespaceAlias()
Get the preferred namespace alias.
at line 196
DOMXPath
xpath()
Gets a reference to the DOMXPath
object, with the default namespace
already registered.