fast-xml-parser 5.2.3 → 5.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,7 @@ export default function readDocType(xmlData, i){
40
40
  const {index} = readNotationExp(xmlData,i+1);
41
41
  i = index;
42
42
  }else if( hasSeq(xmlData, "!--",i) ) comment = true;
43
- else throw new Error("Invalid DOCTYPE");
43
+ else throw new Error(`Invalid DOCTYPE`);
44
44
 
45
45
  angleBracketsCount++;
46
46
  exp = "";
@@ -213,8 +213,8 @@ function readElementExp(xmlData, i) {
213
213
  i = skipWhitespace(xmlData, i);
214
214
  let contentModel = "";
215
215
  // Expect '(' to start content model
216
- if(xmlData[i] === "E" && hasSeq(xmlData, "MPTY",i)) i+=6;
217
- else if(xmlData[i] === "A" && hasSeq(xmlData, "NY",i)) i+=4;
216
+ if(xmlData[i] === "E" && hasSeq(xmlData, "MPTY",i)) i+=4;
217
+ else if(xmlData[i] === "A" && hasSeq(xmlData, "NY",i)) i+=2;
218
218
  else if (xmlData[i] === "(") {
219
219
  i++; // Move past '('
220
220