I'm stymied how to parse some XML.
Specifically, I seek to parse the following XML:
DECLARE @XMLText xml = '<result>
<record>
<field name="usid" id="usid" value="9876" />
<field name="namel" id="namel" value="Jon" />
<field name="namef" id="namef" value="Anderson" />
</record>
<record>
<field name="usid" id="usid" value="4567" />
<field name="namel" id="namel" value="Steve" />
<field name="namef" id="namef" value="Howe" />
</record>
<record>
<field name="usid" id="usid" value="5775" />
<field name="namel" id="namel" value="Chris" />
<field name="namef" id="namef" value="Squire" />
</record>
</result>'
Into this result:
9876, Jon, Anderson
4567, Steve, Howe
5775, Chris, Squire
Dave
[]
Specifically, I seek to parse the following XML:
DECLARE @XMLText xml = '<result>
<record>
<field name="usid" id="usid" value="9876" />
<field name="namel" id="namel" value="Jon" />
<field name="namef" id="namef" value="Anderson" />
</record>
<record>
<field name="usid" id="usid" value="4567" />
<field name="namel" id="namel" value="Steve" />
<field name="namef" id="namef" value="Howe" />
</record>
<record>
<field name="usid" id="usid" value="5775" />
<field name="namel" id="namel" value="Chris" />
<field name="namef" id="namef" value="Squire" />
</record>
</result>'
Into this result:
9876, Jon, Anderson
4567, Steve, Howe
5775, Chris, Squire
Dave
[]