File tree 1 file changed +7
-2
lines changed 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,11 @@ public class ${className} {
70
70
*/
71
71
private static final String XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
72
72
73
+ /**
74
+ * XML namespace
75
+ */
76
+ private static final String XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace";
77
+
73
78
private static final Map<String, String> DEFAULT_ENTITIES;
74
79
static {
75
80
Map<String, String> entities = new HashMap<>();
@@ -521,8 +526,8 @@ public class ${className} {
521
526
String name = parser.getAttributeLocalName(i);
522
527
String ns = parser.getAttributeNamespace(i);
523
528
String value = parser.getAttributeValue(i);
524
- if (XSI_NAMESPACE.equals(ns)) {
525
- // just ignore attributes with non-default namespace (for example: xmlns: xsi)
529
+ if (XSI_NAMESPACE.equals(ns) || XML_NAMESPACE.equals(ns) ) {
530
+ // just ignore attributes with non-default namespace (for example: xsi and xml )
526
531
#if ( $class == $root )
527
532
} else if ("xmlns".equals(name)) {
528
533
// ignore xmlns attribute in root class, which is a reserved attribute name
You can’t perform that action at this time.
0 commit comments