We call a REST web service which returns a XML with field containing a document

We call a REST web service which returns a XML with field containing a document binary stream (in base64). In Appian process model, we use a text PV to receive this web service result XML. How can we extract this binary field into another text PV so that we can further convert it to a document?
Note that we tried xpathsnippet() but it failed to parse such XML....

OriginalPostID-61588

OriginalPostID-61588

  Discussion posts and replies are publicly visible