well-formed.xml is OK
<?xml version="1.0" encoding="UTF-8"?> <people> <group> <person name="Al Zehtooney" age="33" sex="m" smoker="no"/> <person name="Brad York" age="38" sex="m" smoker="yes"/> </group> <group> <person name="Greg Sutter" age="40" sex="m" smoker="no"/> <person name="Harry Rogers" age="37" sex="m" smoker="no"/> <group> <person name="John Quincy" age="43" sex="m" smoker="yes"/> <person name="Kent Peterson" age="31" sex="m" smoker="no"/> </group> <person name="John Frank" age="24" sex="m" smoker="no"/> </group> </people>
not-wf-1.xml: attribute value is not in quotes
-
source not-wf-1.xml
not-wf-1.xml:4: parser error : AttValue: " or ' expected <person name="Al Zehtooney" age=33 sex="m" smoker="no"/> ^ not-wf-1.xml:4: parser error : attributes construct error <person name="Al Zehtooney" age=33 sex="m" smoker="no"/> ^ not-wf-1.xml:4: parser error : Couldn't find end of Start Tag person line 4 <person name="Al Zehtooney" age=33 sex="m" smoker="no"/> ^
not-wf-2.xml: document must have ONE root element
-
source not-wf-2.xml
not-wf-2.xml:6: parser error : Extra content at the end of the document <group> ^
not-wf-3.xml: elements must be properly nested
-
source not-wf-3.xml
not-wf-3.xml:6: parser error : Opening and ending tag mismatch: person line 4 and group </group> ^ not-wf-3.xml:16: parser error : Opening and ending tag mismatch: group line 3 and people </people> ^ not-wf-3.xml:17: parser error : Premature end of data in tag people line 2 ^