I have xml:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<processOCIMessageResponse xmlns="urn:com:broadsoft:webservice">
<processOCIMessageReturn><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<MyDocument protocol="OCI" xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">12345</sessionId>
<command echo="" xsi:type="AuthenticationResponse" xmlns="">
<userId>user_test</userId>
</command>
<command echo="" xsi:type="ServiceProvider" xmlns="">
<ProviderTable>
<colHeading>Service Provider Id</colHeading>
<colHeading>Service Provider Name</colHeading>
<colHeading>Is Enterprise</colHeading>
<row><col>7163939_id</col><col/><col>true</col></row>
<row><col>3134473_build</col><col/><col>true</col></row>
<row><col>11421427_group</col><col/><col>true</col></row>
</ProviderTable>
</command>
</MyDocument>]]>
</processOCIMessageReturn>
</processOCIMessageResponse>
</soapenv:Body>
</soapenv:Envelope>
how I can extract values from col tag? because The tag is repeated several times in one line.
This is what I have so far:
<xsl:for-each select="./command/ProviderTable/row">
<xsl:element name="SERVICE_PROVIDER">
<SERVICE_PROVIDER_ID>
<xsl:value-of select="col"/>
</SERVICE_PROVIDER_ID>
<SERVICE_PROVIDER_NAME>
<xsl:value-of select="col"/>
</SERVICE_PROVIDER_NAME>
<IS_ENTERPRISE>
<xsl:value-of select="col">
</IS_ENTERPRISE>
</xsl:element>
</xsl:for-each>
Expected Output
<?xml version="1.0"?>
<main>
<ProviderTable>
<SERVICE_PROVIDER_ID>7163939_id</SERVICE_PROVIDER_ID>
<SERVICE_PROVIDER_NAME></SERVICE_PROVIDER_NAME>
<IS_ENTERPRISE>true</IS_ENTERPRISE>
</ProviderTable>
<ProviderTable>
<SERVICE_PROVIDER_ID>3134473_build</SERVICE_PROVIDER_ID>
<SERVICE_PROVIDER_NAME></SERVICE_PROVIDER_NAME>
<IS_ENTERPRISE>true</IS_ENTERPRISE>
</ProviderTable>
<ProviderTable>
<SERVICE_PROVIDER_ID>11421427_group</SERVICE_PROVIDER_ID>
<SERVICE_PROVIDER_NAME></SERVICE_PROVIDER_NAME>
<IS_ENTERPRISE>true</IS_ENTERPRISE>
</ProviderTable>
</main>