src/lib/Parser.js
/**
  Throws an invalid character error if any character in the given _string_ isn't
  a valid XML character.

  @param {string} string
  */
Throws an invalid character error if any character in the given _string_ isn't
a valid XML character.
Throws an invalid character error if any character in the given _string_ isn ' t a valid XML character .
validateChars(string) {
    let charIndex = 0;
    for (let char of string) {
      if (syntax.isNotXmlChar(char)) {
        this.scanner.reset(-([ ...string ].length - charIndex));
        this.error('Invalid character');
      }
      charIndex += 1;
    }
  }
validateChars ( string ) { let charIndex = 0 ; for ( let char of string ) { if ( syntax . isNotXmlChar ( char ) ) { this . scanner . reset ( - ( [ ... string ] . length - charIndex ) ) ; this . error ( 'Invalid character' ) ; } charIndex += 1 ; } }
Throws an invalid character error if any character in the given _string_ isn't
a valid XML character.
Throws an invalid character error if any character in the given _string_ isn ' t a valid XML character .