comparison src/goodjava/xml/XmlParser.java @ 1819:9daae8cf4bef

xml minor
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 30 Jun 2024 05:45:19 -0600
parents 3dabc11da660
children
comparison
equal deleted inserted replaced
1818:d3e6c7f64559 1819:9daae8cf4bef
87 throw exception("bad element"); 87 throw exception("bad element");
88 } 88 }
89 89
90 private String string(String name) throws ParseException { 90 private String string(String name) throws ParseException {
91 int start = parser.begin(); 91 int start = parser.begin();
92 while( matchComment() || parser.noneOf("<") ); 92 while( parser.noneOf("<") );
93 String s = parser.textFrom(start); 93 String s = parser.textFrom(start);
94 s = decode(s); 94 s = decode(s);
95 if( !endTag(name) ) 95 if( !endTag(name) )
96 return parser.failure(null); 96 return parser.failure(null);
97 return parser.success(s); 97 return parser.success(s);