Skip to Content
0
Jul 24, 2013 at 10:46 AM

Get via XPATH to value of the tag

24 Views

HI experts!

I have a doubt about XSLT. I'm trying get via XPATH to value of the tag <Nombre> but I don't know how can I do it.

I'm tryng acces with this XPTAH:

<xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;C&apos; and ./@id=&apos;atom1&apos;]/*/Table1/Nombre">

but it's impossible.

I also tried with code:


<xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;C&apos; and ./@id=&apos;atom1&apos;]/DescargarFicheroPendienteResponse/DescargarFicheroPendienteResult/Table1/Nombre">

I think th problem is the tag:

<Payload Role="C" id="atom1" statusNo="0" statusMsg="success" reference="atom2" payload="atom2" calltype="solicit response (call/reply)" adapter="WSAS">


This is the XML:

<Payload Role="C" id="atom1" statusNo="0" statusMsg="success" reference="atom2" payload="atom2" calltype="solicit response (call/reply)" adapter="WSAS">    <http.header>        <http.header.info id="X-AspNet-Version" value="2.0.50727"/>        <http.header.info id="Date" value="Wed, 24 Jul 2013 10:23:53 GMT"/>        <http.header.info id="Content-Length" value="494"/>        <http.header.info id="MicrosoftOfficeWebServer" value="5.0_Pub"/>        <http.header.info id="Content-Type" value="text/xml; charset=utf-8"/>        <http.header.info id="Server" value="Microsoft-IIS/6.0"/>        <http.header.info id="X-Powered-By" value="ASP.NET"/>        <http.header.info id="Cache-Control" value="private, max-age=0"/>    </http.header>    <DescargarFicheroPendienteResponse xmlns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">        <DescargarFicheroPendienteResult>            <NewDataSet xmlns="">                <Table1>                    <Nombre>0</Nombre>                    <Contenido/>                </Table1>            </NewDataSet>        </DescargarFicheroPendienteResult>    </DescargarFicheroPendienteResponse></Payload>

anyone can help me?

Thanks