jrihtarsic commented on code in PR #234:
URL: 
https://github.com/apache/santuario-xml-security-java/pull/234#discussion_r1384439467


##########
src/main/java/org/apache/xml/security/utils/XMLUtils.java:
##########
@@ -706,6 +706,27 @@ public static Element selectXencNode(Node sibling, String 
nodeName, int number)
         return null;
     }
 
+    /**
+     *
+     * @param sibling
+     * @param nodeName
+     * @param number
+     * @return nodes with the given node name
+     */
+    public static Element selectXenc11Node(Node sibling, String nodeName, int 
number) {
+        while (sibling != null) {
+            if 
(EncryptionConstants.EncryptionSpec11NS.equals(sibling.getNamespaceURI())
+                    && sibling.getLocalName().equals(nodeName)) {
+                if (number == 0){
+                    return (Element)sibling;

Review Comment:
   For the code readability, I tried to use as much as possible the same code 
patterns as they have already been used and have been working OK for the last 
two decades. This approach aims to minimize changes as PR is already large 
enough so that the focus would be more on the secure implementation of 
KeyAgreement rather than coding flavors and refactoring. But we can do another 
PR, if @coheigea  agree with it;  to refactor XMLUtils and other DOM processing 
methods.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to