use of org.javarosa.xml.TreeElementParser in project javarosa by opendatakit.
the class ExternalDataInstance method buildFromPath.
public static ExternalDataInstance buildFromPath(String path, String instanceId) throws IOException, UnfullfilledRequirementsException, XmlPullParserException, InvalidStructureException {
String absolutePath = getPathPrefix() + path;
KXmlParser xmlParser = ElementParser.instantiateParser(new FileInputStream(absolutePath));
TreeElementParser treeElementParser = new TreeElementParser(xmlParser, 0, instanceId);
TreeElement root = treeElementParser.parse();
return new ExternalDataInstance(path, instanceId, root);
}
Aggregations