Mercurial Hosting > luan
comparison src/goodjava/xml/XmlElement.java @ 1819:9daae8cf4bef
xml minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 30 Jun 2024 05:45:19 -0600 |
parents | 3c43b07e12b7 |
children |
comparison
equal
deleted
inserted
replaced
1818:d3e6c7f64559 | 1819:9daae8cf4bef |
---|---|
34 } | 34 } |
35 | 35 |
36 public void setContent(XmlElement[] content) { | 36 public void setContent(XmlElement[] content) { |
37 if( content == null ) | 37 if( content == null ) |
38 throw new IllegalArgumentException("content of '"+name+"' can't be null"); | 38 throw new IllegalArgumentException("content of '"+name+"' can't be null"); |
39 if( content.length == 0 ) | |
40 throw new IllegalArgumentException("content of '"+name+"' can't be empty"); | |
41 this.content = content; | 39 this.content = content; |
42 for( XmlElement el : content ) { | 40 for( XmlElement el : content ) { |
43 el.parent = this; | 41 el.parent = this; |
44 } | 42 } |
45 } | 43 } |