FullFormParser¶
-
public class
FullFormParser
¶ Class for converting the XML passed in as a constructor parameter to an instance of the
FormValueElement
class.
Fields¶
Constructors¶
FullFormParser¶
-
public
FullFormParser
(String xmlDoc)¶ Creates an instance of the
FullFormParser
which will provide a method for parsing the givenxmlDoc
.Parameters: - xmlDoc – the XML document
Methods¶
parse¶
-
public FormValueElement
parse
()¶ Method to parse incoming “full” XML forms from CommCareHQ. Parser assumes the form has an element with the tag “data”. If the form does not, and instead has a device report, a null form is returned. Otherwise an exception is thrown indicating an unknown or faulty form XML.
Throws: - FullFormParserException – if the form does not parse correctly and is not a device report form
Returns: the parsed form, null if a device report