I want to split a sub xml from mail xml with the help of the node name. Can some one help?
sample.xml
<div>
<a>A
<b>B
<c>C</c>
</b>
<d>D</d>
</a>
</div>
I want to split the sub xml that contains B using Scala.
I want to split a sub xml from mail xml with the help of the node name. Can some one help?
sample.xml
<div>
<a>A
<b>B
<c>C</c>
</b>
<d>D</d>
</a>
</div>
I want to split the sub xml that contains B using Scala.
This will get you the required xml subtree. Refer scala xml parsing
val x = <div><a>A<b>B<c>C</c></b><d>D</d></a></div>
val b = x \ "a" \ "b"