Project

Profile

Help

Bug #6054

closed

NamedNodeMap.getNamedItem throw UnsupportedOperationException

Added by Khalil Rahmouni 12 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DOM Interface
Sprint/Milestone:
-
Start date:
2023-05-30
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
Java

Description

i use the following Code to extract the value of an attribute, it works fine with version 9.9 but with version 11.5 it throw an exception : UnsupportedOperationException: NodePredicate doesn't support this method.

EnterpriseConfiguration config = new EnterpriseConfiguration();

        NodeInfo rootNode = config.buildDocumentTree(new StreamSource(resourceAsStream)).getRootNode();
        Document document = (Document) DocumentOverNodeInfo.wrap(rootNode);

        Element documentElement1 = document.getDocumentElement();
        NamedNodeMap attributes1 = documentElement1.getAttributes();
        Node namedItem1 = attributes1.getNamedItem("xsi:schemaLocation"); 

Files

valid_baseProduct.xml (1.38 KB) valid_baseProduct.xml Khalil Rahmouni, 2023-05-30 15:40

Please register to edit this issue

Also available in: Atom PDF