Mercurial Hosting > luan
changeset 1819:9daae8cf4bef
xml minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 30 Jun 2024 05:45:19 -0600 |
parents | d3e6c7f64559 |
children | f3ec7f053078 |
files | src/goodjava/xml/XmlElement.java src/goodjava/xml/XmlParser.java |
diffstat | 2 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/goodjava/xml/XmlElement.java Sun Jun 16 20:26:12 2024 -0600 +++ b/src/goodjava/xml/XmlElement.java Sun Jun 30 05:45:19 2024 -0600 @@ -36,8 +36,6 @@ public void setContent(XmlElement[] content) { if( content == null ) throw new IllegalArgumentException("content of '"+name+"' can't be null"); - if( content.length == 0 ) - throw new IllegalArgumentException("content of '"+name+"' can't be empty"); this.content = content; for( XmlElement el : content ) { el.parent = this;
--- a/src/goodjava/xml/XmlParser.java Sun Jun 16 20:26:12 2024 -0600 +++ b/src/goodjava/xml/XmlParser.java Sun Jun 30 05:45:19 2024 -0600 @@ -89,7 +89,7 @@ private String string(String name) throws ParseException { int start = parser.begin(); - while( matchComment() || parser.noneOf("<") ); + while( parser.noneOf("<") ); String s = parser.textFrom(start); s = decode(s); if( !endTag(name) )