from static method

XmlProcessingInstruction? from(
  1. String string, {
  2. bool trimWhitespace = true,
})
override

Returns the first XML Processing Instruction 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.

Returns null if no XML Processing Instruction was found.

Implementation

static XmlProcessingInstruction? from(
  String string, {
  bool trimWhitespace = true,
}) {
  return StringParser.from<XmlProcessingInstruction>(
    input: string,
    delimiter: Delimiters.processingInstruction,
    getNode: _getProcessingInstruction,
    trimWhitespace: trimWhitespace,
  );
}