XmlDocumentFragment.parse constructor
XmlDocumentFragment.parse(
- String input, {
- XmlEntityMapping? entityMapping,
Return an XmlDocumentFragment for the given input
string, or throws an
XmlParserException if the input is invalid.
Note: It is the responsibility of the caller to provide a standard Dart String using the default UTF-16 encoding.
Implementation
factory XmlDocumentFragment.parse(
String input, {
XmlEntityMapping? entityMapping,
}) {
final events = parseEvents(
input,
entityMapping: entityMapping,
validateNesting: true,
);
return XmlDocumentFragment(const XmlNodeDecoder().convertIterable(events));
}