callow
callow

Reputation: 517

Parsing xml string containing multiple xml documents

I have a string like the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><abc><xyz/></abc><?xml version="1.0" encoding="UTF-8" standalone="yes"?><abc><xyz/></abc>

Is there a way in Xquery to obtain two document nodes from it? Each document will have abc as its root element.

Upvotes: 0

Views: 70

Answers (1)

grtjn
grtjn

Reputation: 20414

How about tokenizing on <?xml, and then applying xdmp:unquote on each item in the sequence?

HTH!

Upvotes: 1

Related Questions