mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 11:05:28 -04:00
Bad XML
This commit is contained in:
parent
294c16be1b
commit
90e62b0e1b
@ -32,7 +32,7 @@ import java.util.Iterator;
|
|||||||
* JSONObject, and to covert a JSONArray or JSONObject into an XML text using
|
* JSONObject, and to covert a JSONArray or JSONObject into an XML text using
|
||||||
* the JsonML transform.
|
* the JsonML transform.
|
||||||
* @author JSON.org
|
* @author JSON.org
|
||||||
* @version 2011-10-04
|
* @version 2011-10-05
|
||||||
*/
|
*/
|
||||||
public class JSONML {
|
public class JSONML {
|
||||||
|
|
||||||
@ -66,6 +66,9 @@ public class JSONML {
|
|||||||
// <? ... ?>
|
// <? ... ?>
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (!x.more()) {
|
||||||
|
throw x.syntaxError("Bad XML");
|
||||||
|
}
|
||||||
token = x.nextContent();
|
token = x.nextContent();
|
||||||
if (token == XML.LT) {
|
if (token == XML.LT) {
|
||||||
token = x.nextToken();
|
token = x.nextToken();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user