parseAllViews static method

List<ParseResult> parseAllViews(
  1. String xmlContent
)

Parse all views in a file

Implementation

static List<ParseResult> parseAllViews(String xmlContent) {
  try {
    final doc = xml.XmlDocument.parse(xmlContent);
    return doc.findAllElements('record').map(_parseRecord).toList();
  } on xml.XmlParserException catch (e) {
    return [ParseResult.failure('XML parse error: ${e.message}')];
  } catch (e) {
    return [ParseResult.failure('Unexpected error: $e')];
  }
}