我遇到的问题是我需要创建一个类的XML代码,该类包含一些基元以及带有值的嵌套类。不幸的是,要求是两次<界面>而SimpleXML根本不喜欢它。如何强制SimpleXML接受具有相同名称的第二个标记?
// ...
@Element(name="Interface")
public Interface Interface;
@Element(name="Interface") // same name is an issue, but required in XML
public Interface Interface2;
// ...
答案 0 :(得分:0)
尝试使用以下代码段:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=16672, tid=5124
#
# JRE version: (15.0+36) (build )
# Java VM: OpenJDK 64-Bit Server VM (15+36, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C 0x0000000000000000
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#