fix bug in XML parser for Validator

This commit is contained in:
Grahame Grieve 2020-06-09 17:20:35 +10:00
parent 17fb1462c4
commit 6b7aa93dc7
1 changed files with 6 additions and 1 deletions

View File

@ -687,6 +687,11 @@ private boolean elementIsOk(String name) throws FHIRFormatError {
readChar();
}
private void skipWhiteSpaceInternal() throws IOException {
while (Character.isWhitespace(peekChar()) || (peekChar() == 0xfeff))
readChar();
}
private void pushChar(char ch) {
cache = Character.toString(ch)+cache;
}
@ -1151,7 +1156,7 @@ private boolean elementIsOk(String name) throws FHIRFormatError {
readChar();
if (peekChar() == '?') {
readToTagEnd();
skipWhiteSpace();
skipWhiteSpaceInternal();
if (peekChar() != '<')
throw new FHIRException("Unable to Parse HTML - does not start with tag after processing instruction. Found "+peekChar()+descLoc());
readChar();