: QXmlDefaultHandler(),
currentIsotope_(0),
inAtomicNumber_(false),
- inExactMass_(false)
+ inExactMass_(false),
+ inAbundance_(false)
{
currentElementSymbol_ = "";
}
{
for (int i = 0; i < attrs.length(); ++i)
{
-
if ( attrs.localName( i ) == "errorValue" )
{
currentErrorValue_ = QVariant( attrs.value( i ) );
else if (attrs.value(i) == "bo:exactMass")
inExactMass_ = true;
}
+ } else if (inIsotope_ && localName == "bo:relativeAbundance") {
+ kdDebug() << "bo:relativeAbundance" << endl;
+ inAbundance_ = true;
}
return true;
}
type = ChemicalDataObject::atomicNumber;
inAtomicNumber_ = false;
}
+ else if ( inAbundance_ ){
+ value = ch;
+ type = ChemicalDataObject::relativeAbundance;
+ inAbundance_ = false;
+ }
else//it is a non known value. Do not create a wrong object but return
return true;