XPath expressions can't automatically register single character prefixes #1

Closed
opened 2023-02-05 16:32:09 -05:00 by dustinwilson · 0 comments
Owner

If the prefix or the local name is just a single character neither Document::evaluate nor Document::createExpression will resolve prefixes.

Example:

$d = new XMLDocument('<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"></s:Envelope>', 'UTF-8');
$d->evaluate('//s:Envelope', $d, $d->createNSResolver($d));

Throws an exception

If the prefix or the local name is just a single character neither `Document::evaluate` nor `Document::createExpression` will resolve prefixes. Example: ```php $d = new XMLDocument('<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"></s:Envelope>', 'UTF-8'); $d->evaluate('//s:Envelope', $d, $d->createNSResolver($d)); ``` Throws an exception
dustinwilson referenced this issue from a commit 2023-02-05 16:41:05 -05:00
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: MensBeam/HTML-DOM#1
No description provided.