1
Vote

Unit conversion lib - error in xml parsing

description

the line
XElement conversionElement = child.Element("ConversionToBaseUnit");
 
needs to change to
XElement conversionElement = child.Element(@namespace + "ConversionToBaseUnit");
 
The namespace is missing, so none of the conversion elements are ever loaded

comments

boomhauer wrote Sep 15, 2011 at 4:57 AM

also: a couple places call .Value.Trim() on xelements, before checkign if hte xelement is null. this will blow up

wrote Feb 14, 2013 at 1:45 AM