Does reading a xml file using Nokogiri require a root element

cubanito2002

New Member
I seem to be having problems reading an xml file when it doesn't contain a 'root'. Consider file like this:\[code\]<?xml version="1.0" encoding="utf-8"?><a><country>US</country></a><b><country>UK</country></b>\[/code\]Nokogiri seem to only read the first element. If the xml file has a root element seems to work fine. I am using Nokogiri 1.5.6. XML amateur.This works:\[code\]<?xml version="1.0" encoding="utf-8"?><root><a><country>US</country></a><b><country>UK</country></b></root>\[/code\]
 
Back
Top