, , (row \ "ResultDetectionConditionText") null, - NodeSeq ( Scala , , null, , , ). , Some, , , , . != null .nonEmpty .
, :
val cond = (row \ "ResultDetectionConditionText").exists(
_.text.toLowerCase contains "non-detect"
)
: NodeSeq, "Result...", , , NodeSeq node, "non-detect". , , , , , - -, , - :
val row = <row>
<ResultDetectionConditionText>non-d</ResultDetectionConditionText>
<ResultDetectionConditionText>etect</ResultDetectionConditionText>
</row>
.
"illegal start of simple expression" - . , , name, , , . - Option:
val name = if (cond) Some((row \ "CharacteristicName").text) else None
, name, .