Ns
class Ns (View source)
Provides tools for managing and working with XML namespaces.
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 array | $mapping | A mapping of namespace URIs to preferred namespace aliases. |
Methods
Gets the DOMDocument object which is being used to parse the content.
Adds new aliases to this list of aliases. Set an associative array where the key is the namespace URI and the namespace alias as the value.
Gets the list of document-defined namespace aliases and namespace URIs.
Gets the preferred namespace alias for a particular feed dialect.
Details
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.
at line 37
__construct(DOMDocument $dom)
Constructs a new instance of this class.
at line 52
array
addAliases(array $aliases)
Adds new aliases to this list of aliases. Set an associative array where the key is the namespace URI and the namespace alias as the value.
at line 63
array
getDocNamespaces()
Gets the list of document-defined namespace aliases and namespace URIs.
at line 75
string
getPreferredNamespaceAlias(string|null $namespaceUri = null)
Gets the preferred namespace alias for a particular feed dialect.