This is the XML stored in XMLTYPE column of a table test.

<field1 name = "Book Name" browser = "1" >Harry potter</field1>
<field2 name = "Quantity" browser = "1" >10</field2>
<field3 name = "Ship Date" browser = "0" > </field3>

The problem is :

I want a query through which we get the data stored in XML for which the attribute browser=1. The xml elements are generated dynamically so I cannot hardcode the entire XPATH.

I tried the following query:

select e.form_xml.extract('/rowset/*/text()').getStringVal()
from test e

and this is the result which I get:

Harry potter10

It has combined both Harry potter and 10 in one column without any separator.

Is there any way that we get Harry potter and 10 as two separate columns or can we have a separator between the 2 values.