public class XFormUtils extends Object
| Constructor and Description |
|---|
XFormUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getAttributeList(org.kxml2.kdom.Element e) |
static FormDef |
getFormFromFormXml(String formXmlSrc,
String lastSavedSrc) |
static FormDef |
getFormFromInputStream(InputStream is)
Parses a form with an external secondary instance, and returns a FormDef.
|
static FormDef |
getFormFromInputStream(InputStream is,
String lastSavedSrc) |
static FormDef |
getFormFromResource(String resource) |
static FormDef |
getFormFromSerializedResource(String resource) |
static FormDef |
getFormRaw(InputStreamReader isr) |
static List<String> |
getUnusedAttributes(org.kxml2.kdom.Element e,
List<String> usedAtts) |
static boolean |
isOutput(org.kxml2.kdom.Element e)
Is this element an Output tag?
|
static IXFormParserFactory |
setXFormParserFactory(IXFormParserFactory factory) |
static boolean |
showUnusedAttributeWarning(org.kxml2.kdom.Element e,
List<String> usedAtts) |
static String |
unusedAttWarning(org.kxml2.kdom.Element e,
List<String> usedAtts) |
public static IXFormParserFactory setXFormParserFactory(IXFormParserFactory factory)
public static FormDef getFormFromResource(String resource) throws XFormParser.ParseException
XFormParser.ParseExceptionpublic static FormDef getFormRaw(InputStreamReader isr) throws XFormParseException, IOException, XFormParser.ParseException
public static FormDef getFormFromInputStream(InputStream is) throws XFormParseException, XFormParser.ParseException
is - the InputStream containing the formXFormParseException - if the form can’t be parsedXFormParser.ParseExceptionpublic static FormDef getFormFromInputStream(InputStream is, String lastSavedSrc) throws XFormParser.ParseException
lastSavedSrc - The src of the last-saved instance of this form (for auto-filling). If null,
no data will be loaded and the instance will be blank.XFormParser.ParseExceptiongetFormFromInputStream(InputStream)public static FormDef getFormFromFormXml(String formXmlSrc, String lastSavedSrc) throws XFormParseException, XFormParser.ParseException
formXmlSrc - The path to the XForm that is to be parsedlastSavedSrc - The src of the last-saved instance of this form (for auto-filling). If null,
no data will be loaded and the instance will be blank.XFormParseExceptionXFormParser.ParseExceptionpublic static List<String> getUnusedAttributes(org.kxml2.kdom.Element e, List<String> usedAtts)
public static String unusedAttWarning(org.kxml2.kdom.Element e, List<String> usedAtts)
public static boolean showUnusedAttributeWarning(org.kxml2.kdom.Element e,
List<String> usedAtts)
public static boolean isOutput(org.kxml2.kdom.Element e)
e - Copyright © 2023. All rights reserved.