简体   繁体   English

如果使用Simpleframework解析该xml文件时我们具有如下相同的元素名称,该怎么办

[英]What to do if we have same element name as follows while parsing that xml file using Simpleframework

What to do if we have same element name as follows while parsing that xml file using Simpleframework ? 如果使用Simpleframework解析该xml文件时我们具有如下相同的元素名称,该怎么办?

<CCCC_Project>
    <timestamp>Wed Jun 05 15:00:27 2013</timestamp>-
    <project_summary>
        <number_of_modules level="0" value="1" />
        <lines_of_code level="0" value="3" /> lines_of_code_per_module
        <level="0" value="3.000" />
        <McCabes_cyclomatic_complexity level="0" value="0" />
        <McCabes_cyclomatic_complexity_per_module level="0" value="0.000" />
        <lines_of_comment level="0" value="0" />
        <lines_of_comment_per_module level="0" value="0.000" />
        <lines_of_code_per_line_of_comment level="0" value="------" />
        <McCabes_cyclomatic_complexity_per_line_of_comment level="0" value="------" />
        <IF4 level="0" value="0" />
        <IF4_per_module level="0" value="0.000" />
        <IF4_visible level="0" value="0" />
        <IF4_visible_per_module level="0" value="0.000" />
        <IF4_concrete level="0" value="0" />
        <IF4_concrete level="0.000" value="0" />
        <rejected_lines_of_code level="0" value="0" />
    </project_summary>

Try this 尝试这个

@ElementList(inline=true, entry="IF4_concrete")
List<IF_concrete> list;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 @ org.simpleframework.xml.Element已使用元素“名称” - Element 'Name' is already used with @org.simpleframework.xml.Element 使用具有两个节点的sax解析器解析文件具有相同的名称 - parsing file using sax parser with two nodes have the same name SimpleFramework XML:具有内部文本和子元素的元素 - SimpleFramework XML: element with inner text and child elements 使用SimpleFramework反序列化多个不同的标签(具有相同的名称) - Deserializing multiple different tags (with the same name) with SimpleFramework 如何在Simpleframework XML上删除元素列表null - How to remove an Element List null on Simpleframework XML 使用Java解析每个元素具有多个同名子级的XML - Parsing XML with multiple same name child per Element with java 使用simpleframework将XML解析为Java Object List - Parse XML into Java Object List using simpleframework 使用DocumentBuilder解析XML文件时出现“ MalformedURLException” - 'MalformedURLException' while parsing an XML file using DocumentBuilder 使用SimpleFramework将XML转换为Java对象 - XML to java Object conversion using simpleframework XMLStreamException:找不到要写入的元素:使用StAX解析xml文件时,ArrayIndexOutOfBoundsException - XMLStreamException: No element was found to write: ArrayIndexOutOfBoundsException while parsing xml file using StAX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM