# Re: Parse XML that isn't well formed

**URL:** <https://www.ruby-forum.com/t/re-parse-xml-that-isnt-well-formed/114975>\
**Category:** Ruby\
**Created:** [September 19, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/re-parse-xml-that-isnt-well-formed/114975 "2007-09-19T12:31:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 19, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/re-parse-xml-that-isnt-well-formed/114975/1 "2007-09-19T12:31:27Z")

</div>

Hi

looking at the xml that you have presented, there is no root element to  
the document - this is why the xml is being rejected - you can only have  
a single root element in the document - you could try something like  
this:

\<?xml version="1.0" encoding="UTF-8"?\> http://myserver.edu/data/ myserver.edu /storage/data/results/ hadcm3l\_00012\_00000118\_0 hadcm3l\_00012\_00000118\_0\_6.zip 5154055 485600296bb601ab4a3d1d49a9fb1c86 hadcm3l\_00012\_00000118\_0\_7.zip 5153055 36a600296cb60229a3d1d49a9fb1a10 

If all the files that you are trying are similar to the set up that you  
have demonstrated then this could be the root cause. When fixed you  
should then be able to use whichever xml parser you want.

HTH

Clive
