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

Closed
opened 1 year ago 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 added the
bug
label 1 year ago
dustinwilson self-assigned this 1 year ago
dustinwilson referenced this issue from a commit 1 year ago
dustinwilson closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.