parseString static method
Returns a list of every XmlProcessingInstruction found in string
.
string
must not be null
.
If trimWhitespace
is true
, unnecessary whitespace between nodes
will be removed and all remaining whitespace will be replaced with
a single space. trimWhitespace
must not be null
.
start
and stop
refer to the indexes of the identified XML Processing
Instruction nodes. Only matches found between start
and stop
will be
returned. start
must not be null
and must be >= 0
. stop
may be
null
, but must be >= start
if provided.
Returns null
if no XML Processing Instructions were found.
Implementation
static List<XmlProcessingInstruction>? parseString(
String string, {
bool trimWhitespace = true,
int start = 0,
int? stop,
}) {
assert(start >= 0);
assert(stop == null || stop >= start);
return StringParser.parse<XmlProcessingInstruction>(
input: string,
delimiter: Delimiters.processingInstruction,
getNode: _getProcessingInstruction,
trimWhitespace: trimWhitespace,
start: start,
stop: stop,
);
}