Uses reflection to get the value of fieldName
on obj
, and puts its
toString into an XML tag.
A convenience overload for restoreTag that takes a NodeSeq rather than a single Node, but only uses the data stored in the first Node in the Seq (if one exists at all).
Given an object and a tag produced by getTagFor, attempts to restore the value saved in that tag to the object, i.e., does the inverse of getTagFor.
Given an object and a tag produced by getTagFor, attempts to restore the value saved in that tag to the object, i.e., does the inverse of getTagFor.
Note that this will only work for Scala classes, because it assumes that the setter for a var is that var's name appended with "_=".