mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
made the data_source element optional in the XML schema
This commit is contained in:
parent
16bbb27735
commit
11b05c47ea
@ -103,20 +103,25 @@ public class ExternalResultsXML implements ExternalResultsParser {
|
||||
return resultsData;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param root
|
||||
* @throws Exception
|
||||
*/
|
||||
private void parseDataSource(Element root ) throws Exception {
|
||||
NodeList nodeList = root.getElementsByTagName(DATASRC_EL);
|
||||
final int numNodes = nodeList.getLength();
|
||||
|
||||
if (numNodes == 0) {
|
||||
throw new Exception("Error: No data source specified in XML file.");
|
||||
}
|
||||
|
||||
for(int index = 0; index < numNodes; ++index) {
|
||||
Element el = (Element)nodeList.item(index);
|
||||
|
||||
resultsData.addDataSource(el.getTextContent());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param root
|
||||
*/
|
||||
private void parseArtifacts(Element root ) {
|
||||
NodeList nodeList = root.getElementsByTagName(ARTLIST_EL);
|
||||
final int numNodes = nodeList.getLength();
|
||||
|
@ -3,7 +3,7 @@
|
||||
<xs:element name="autopsy_results">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="data_source" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="data_source" type="xs:string" />
|
||||
<xs:element name="artifacts">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
Loading…
x
Reference in New Issue
Block a user