0
私はorg.simpleframework.xmlを使用しようとしています。私のAndroidプロジェクトでXMLデータを処理するためのクラス。私は私のクラス "ChecklistGradeDetail" を構築する方法を理解することはできませんが、私はこのAndroid、simpleframework PersistenceException
01-09 14:56:05.615: WARN/System.err(896): org.simpleframework.xml.core.PersistenceException: Element 'ChecklistGradeDetail' declared twice at line -1
XML /残り
<ArrayOfChecklistGradeDetail xmlns="http://schemas.datacontract.org/2004/07/TeamTask.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ChecklistGradeDetail>
<ChecklistItemID>34</ChecklistItemID>
<ChecklistItemText>requirements</ChecklistItemText>
<Comments>please pass</Comments>
<CreatedOn>2011-09-07T16:30:08.14</CreatedOn>
<GradeDetailID>362</GradeDetailID>
<NotPerformed>false</NotPerformed>
<Preceptor>System Administrator</Preceptor>
<Satisfactory>true</Satisfactory>
<Unsatisfactory>false</Unsatisfactory>
<UserID>admin</UserID>
</ChecklistGradeDetail>
<ChecklistGradeDetail>
<ChecklistItemID>35</ChecklistItemID>
<ChecklistItemText>write test</ChecklistItemText>
<Comments>please pass</Comments>
<CreatedOn>2011-09-07T16:30:08.14</CreatedOn>
<GradeDetailID>363</GradeDetailID>
<NotPerformed>false</NotPerformed>
<Preceptor>System Administrator</Preceptor>
<Satisfactory>true</Satisfactory>
<Unsatisfactory>false</Unsatisfactory>
<UserID>admin</UserID>
</ChecklistGradeDetail>
<ChecklistGradeDetail>
<ChecklistItemID>36</ChecklistItemID>
<ChecklistItemText>execute test</ChecklistItemText>
<Comments>please pass</Comments>
<CreatedOn>2011-09-07T16:30:08.14</CreatedOn>
<GradeDetailID>364</GradeDetailID>
<NotPerformed>false</NotPerformed>
<Preceptor>System Administrator</Preceptor>
<Satisfactory>true</Satisfactory>
<Unsatisfactory>false</Unsatisfactory>
<UserID>admin</UserID>
</ChecklistGradeDetail>
</ArrayOfChecklistGradeDetail>
ArrayofChecklistGradeDetailクラス
@Root
public class ArrayOfChecklistGradeDetail {
@ElementList(name="ChecklistGradeDetail")
public ArrayList<ChecklistItems> Checklist;
}
ChecklistItemクラス
public class ChecklistItems {
@Element(required=false)
public String ChecklistItemID;
@Element(required=false)
public String ChecklistItemText;
@Element(required=false)
public String Comments;
@Element(required=false)
public String CreatedOn;
@Element(required=false)
public String GradeDetailID;
@Element(required=false)
public String NotPerformed;
@Element(required=false)
public String Preceptor;
@Element(required=false)
public String Satisfactory;
@Element(required=false)
public String Unsatisfactory;
@Element(required=false)
public String UserID;
}
を取得します
彼lp :(