php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63410 DOMElement is missing method for fetching all inscope namespaces
Submitted: 2012-11-01 10:59 UTC Modified: 2024-07-04 12:39 UTC
From: jirka at kosek dot cz Assigned: nielsdos (profile)
Status: Closed Package: DOM XML related
PHP Version: 5.4.8 OS:
Private report: No CVE-ID: None
 [2012-11-01 10:59 UTC] jirka at kosek dot cz
Description:
------------
If XML documents you are processing are using QNames inside attribute or element values there is need to get list of all XML namespaces declared for a particular element inside DOM.

libxml2 has function for this

http://www.xmlsoft.org/html/libxml-tree.html#xmlGetNsList

Unfortunately this function is not exposed in PHP DOM extensions and there is no other way how to get namespaces inscope for some element.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2024-07-04 12:39 UTC] nielsdos@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nielsdos
 [2024-07-04 12:39 UTC] nielsdos@php.net
The fix for this bug has been committed.
If you are still experiencing this bug, try to check out latest source from https://github.com/php/php-src and re-test.
Thank you for the report, and for helping us make PHP better.

This functionality is included in the new DOM classes in PHP 8.4-dev. There's a dedicated getInScopeNamespaces() method.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC