Creating a sequence of elements using Xpath 2.0 (as opposed to using XSLT)
I'd like to create a sequence of elements in xpath 2.0
You can do something like:
('a','b','c')
to create a sequence of strings.
I want to do something like:
(<a>1</a>,<a>2</a>,<a>3</a>)
to create a sequence of elements.
I开发者_如何学Cs this possible? Yes, I know how to do it using XSLT.
Thanks in advance.
In xpath 3.0 you can use xml-parse()
function as in:
parse-xml("&lt;a&gt;1&lt;/a&gt;,&lt;a&gt;2&lt;/a&gt;,&lt;a&gt;3&lt;/a&gt;")
精彩评论