Antes del codigo algo de teoria.
JSON, acrónimo de JavaScript Object Notation, es un formato de texto ligero para el intercambio de datos. JSON es un subconjunto de la notación literal de objetos de JavaScript aunque hoy, debido a su amplia adopción como alternativa a XML, se considera un formato de lenguaje independiente.
Una de las supuestas ventajas de JSON sobre XML como formato de intercambio de datos es que es mucho más sencillo escribir un analizador sintáctico (parser) de JSON. En JavaScript, un texto JSON se puede analizar fácilmente usando la función eval(), lo cual ha sido fundamental para que JSON haya sido aceptado por parte de la comunidad de desarrolladores AJAX, debido a la ubicuidad de JavaScript en casi cualquier navegador web.
Si bien es frecuente ver JSON posicionado contra XML, también es frecuente el uso de JSON y XML en la misma aplicación. Por ejemplo, una aplicación de cliente que integra datos de Google Maps con datos meteorológicos en SOAP hacen necesario soportar ambos formatos.
También cabe mencionar que el siguiente código solo es aplicable para la convención PARKER bajo otras convenciones posiblemente toque realizar algunas modificaciones.
Para mas información de las convenciones JSON te sugiero revisar el sgte Link Convensiones Json y XML
El sgte stylesheet
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx"
xmlns:exsl="http://exslt.org/common"
exclude-result-prefixes="xsl xs json exsl">
<xsl:output indent="yes" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:strip-space elements="*" />
<!--====================================================================-->
<!-- Transformacion Texto en Json a XML -->
<!-- Tomado de Datobyte.blogSpot.com -->
<!-- Desarrollado por Wilfer Giraldo -->
<!--====================================================================-->
<!--Descripcion: La siguiente Transformacion convierte texto Json -->
<!-- a estructura XML, Usando la convencion PARKER -->
<!--Convencion parker: http://wiki.open311.org/JSON_and_XML_Conversion/ -->
<!-- tomar especial atencion a los Input y output de -->
<!-- cada template, estatransformacion usa recursividad -->
<!--====================================================================-->
<!--NOTA ESPECIAL: Esta transformacion trabaja con tipos de datos -->
<!-- String y int -->
<!--====================================================================-->
<xsl:variable name="quot" select="'"'" />
<xsl:template match="/*">
<xsl:variable name="t1">
<xsl:call-template name="object">
<xsl:with-param name="json-in" select="." />
</xsl:call-template>
</xsl:variable>
<xsl:apply-templates select="exsl:node-set($t1)/output/*" mode="copy-sans-namespace" />
</xsl:template>
<xsl:template match="*" mode="copy-sans-namespace">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="copy-sans-namespace" />
</xsl:element>
</xsl:template>
<xsl:template name="field">
<!-- Input like: "Open": "25.15" bla -->
<!-- output like: <so:output><Open>25.15</Open></so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:variable name="field-name" select="substring-before(substring-after($json-in,$quot),$quot)" />
<xsl:variable name="remainder" select="substring-after($json-in,':')" />
<xsl:call-template name="value">
<xsl:with-param name="json-in" select="$remainder" />
<xsl:with-param name="parent-ele" select="$field-name" />
</xsl:call-template>
</xsl:template>
<xsl:template name="fields">
<!-- Input like: "Open": "25.15" , "High": "25.15" } bla -->
<!-- output like: <so:output><Open>25.15</Open><High>25.15</High></so:output> <so:extra>} bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:variable name="n" select="normalize-space($json-in)" />
<xsl:choose>
<xsl:when test="substring($n,1,1) = $quot">
<xsl:variable name="t1">
<xsl:call-template name="field">
<xsl:with-param name="json-in" select="$n" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t2" select="normalize-space( exsl:node-set($t1)/extra) " />
<xsl:variable name="t3">
<xsl:choose>
<xsl:when test="substring($t2,1,1)=','">
<xsl:call-template name="fields">
<xsl:with-param name="json-in" select="substring-after($t2,',')" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$t2">
<extra><xsl:value-of select="$t2" /></extra>
</xsl:when>
</xsl:choose>
</xsl:variable>
<output>
<xsl:copy-of select="exsl:node-set($t1)/output/* | exsl:node-set($t3)/output/*" />
</output>
<xsl:copy-of select="exsl:node-set($t3)/extra" />
</xsl:when>
<xsl:when test="$n">
<extra><xsl:value-of select="$n" /></extra>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="object">
<!-- Input like: { X } bla -->
<!-- output like: <so:output>fields(X)</so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" select="''" />
<xsl:variable name="t1" select="normalize-space(substring-after($json-in,'{'))" />
<xsl:variable name="t2">
<xsl:call-template name="fields">
<xsl:with-param name="json-in" select="$t1" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t3" select="normalize-space(substring-after( exsl:node-set($t2)/extra, '}'))" />
<output>
<xsl:choose>
<xsl:when test="$parent-ele">
<xsl:element name="{$parent-ele}">
<xsl:copy-of select="exsl:node-set($t2)/output/node()" />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="exsl:node-set($t2)/output/node()" />
</xsl:otherwise>
</xsl:choose>
</output>
<xsl:if test="$t3">
<extra><xsl:value-of select="$t3" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="objects">
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="n" select="normalize-space($json-in)" />
<xsl:choose>
<xsl:when test="substring($n,1,1) = '{'">
<xsl:variable name="t1">
<xsl:call-template name="object">
<xsl:with-param name="json-in" select="$n" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t2" select="normalize-space( exsl:node-set($t1)/extra) " />
<xsl:variable name="t3">
<xsl:choose>
<xsl:when test="substring($t2,1,1)=','">
<xsl:call-template name="objects">
<xsl:with-param name="json-in" select="normalize-space(substring-after($t2,','))" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$t2">
<extra><xsl:value-of select="$t2" /></extra>
</xsl:when>
</xsl:choose>
</xsl:variable>
<output>
<xsl:copy-of select="exsl:node-set($t1)/output/* | exsl:node-set($t3)/output/*" />
</output>
<xsl:copy-of select="exsl:node-set($t3)/extra" />
</xsl:when>
<xsl:when test="$n">
<extra><xsl:value-of select="$n" /></extra>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="array">
<!-- Input like: [ X1 X2 ] bla -->
<!-- output like: <so:output><Y>X1</Y><Y>X2</Y></so:output> <so:extra>}bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="t1" select="normalize-space(substring-after($json-in,'['))" />
<xsl:variable name="t2">
<xsl:call-template name="objects">
<xsl:with-param name="json-in" select="$t1" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t3" select="normalize-space(substring-after( exsl:node-set($t2)/extra, ']'))" />
<xsl:copy-of select="exsl:node-set($t2)/output" />
<xsl:if test="$t3">
<extra><xsl:value-of select="$t3" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="value">
<!-- Input like either array, object or string -->
<!-- output like either array, object or string -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="first-letter" select="substring(normalize-space($json-in),1,1)" />
<xsl:choose>
<xsl:when test="$first-letter='{'">
<xsl:call-template name="object">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$first-letter='['">
<xsl:call-template name="array">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$first-letter=$quot">
<xsl:call-template name="string">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$first-letter='0' or $first-letter='1' or $first-letter='2' or $first-letter='3' or $first-letter='4' or $first-letter='5' or $first-letter='6' or $first-letter='7' or $first-letter='8' or $first-letter='9'">
<xsl:call-template name="entero">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<output>ERROR</output>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="string">
<!-- Input like: "X" bla -->
<!-- output like: <so:output><Y>X</Y></so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="value" select="substring-before(substring-after($json-in,$quot),$quot)" />
<xsl:variable name="remainder" select="normalize-space(substring-after(substring-after($json-in,$quot),$quot))" />
<output>
<xsl:element name="{$parent-ele}">
<xsl:value-of select="$value" />
</xsl:element>
</output>
<xsl:if test="$remainder">
<extra><xsl:value-of select="$remainder" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="entero">
<!-- Input like: "X" bla -->
<!-- output like: <so:output><Y>X</Y></so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="value">
<xsl:call-template name="loopNumber">
<xsl:with-param name="json-in" select="$json-in" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="remainder" select="normalize-space(substring-after($json-in,$value))" />
<output>
<xsl:element name="{$parent-ele}">
<xsl:value-of select="$value" />
</xsl:element>
</output>
<xsl:if test="$remainder">
<extra><xsl:value-of select="$remainder" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="loopNumber">
<xsl:param name="json-in" />
<xsl:variable name="first-number" select="substring(normalize-space($json-in),1,1)" />
<xsl:choose>
<xsl:when test="$first-number='0' or $first-number='1' or $first-number='2' or $first-number='3' or $first-number='4' or $first-number='5' or $first-number='6' or $first-number='7' or $first-number='8' or $first-number='9'">
<xsl:variable name="t1">
<xsl:call-template name="loopNumber">
<xsl:with-param name="json-in" select="substring-after($json-in,$first-number)" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="concat($first-number,t1)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx"
xmlns:exsl="http://exslt.org/common"
exclude-result-prefixes="xsl xs json exsl">
<xsl:output indent="yes" encoding="UTF-8" omit-xml-declaration="yes" />
<xsl:strip-space elements="*" />
<!--====================================================================-->
<!-- Transformacion Texto en Json a XML -->
<!-- Tomado de Datobyte.blogSpot.com -->
<!-- Desarrollado por Wilfer Giraldo -->
<!--====================================================================-->
<!--Descripcion: La siguiente Transformacion convierte texto Json -->
<!-- a estructura XML, Usando la convencion PARKER -->
<!--Convencion parker: http://wiki.open311.org/JSON_and_XML_Conversion/ -->
<!-- tomar especial atencion a los Input y output de -->
<!-- cada template, estatransformacion usa recursividad -->
<!--====================================================================-->
<!--NOTA ESPECIAL: Esta transformacion trabaja con tipos de datos -->
<!-- String y int -->
<!--====================================================================-->
<xsl:variable name="quot" select="'"'" />
<xsl:template match="/*">
<xsl:variable name="t1">
<xsl:call-template name="object">
<xsl:with-param name="json-in" select="." />
</xsl:call-template>
</xsl:variable>
<xsl:apply-templates select="exsl:node-set($t1)/output/*" mode="copy-sans-namespace" />
</xsl:template>
<xsl:template match="*" mode="copy-sans-namespace">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="copy-sans-namespace" />
</xsl:element>
</xsl:template>
<xsl:template name="field">
<!-- Input like: "Open": "25.15" bla -->
<!-- output like: <so:output><Open>25.15</Open></so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:variable name="field-name" select="substring-before(substring-after($json-in,$quot),$quot)" />
<xsl:variable name="remainder" select="substring-after($json-in,':')" />
<xsl:call-template name="value">
<xsl:with-param name="json-in" select="$remainder" />
<xsl:with-param name="parent-ele" select="$field-name" />
</xsl:call-template>
</xsl:template>
<xsl:template name="fields">
<!-- Input like: "Open": "25.15" , "High": "25.15" } bla -->
<!-- output like: <so:output><Open>25.15</Open><High>25.15</High></so:output> <so:extra>} bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:variable name="n" select="normalize-space($json-in)" />
<xsl:choose>
<xsl:when test="substring($n,1,1) = $quot">
<xsl:variable name="t1">
<xsl:call-template name="field">
<xsl:with-param name="json-in" select="$n" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t2" select="normalize-space( exsl:node-set($t1)/extra) " />
<xsl:variable name="t3">
<xsl:choose>
<xsl:when test="substring($t2,1,1)=','">
<xsl:call-template name="fields">
<xsl:with-param name="json-in" select="substring-after($t2,',')" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$t2">
<extra><xsl:value-of select="$t2" /></extra>
</xsl:when>
</xsl:choose>
</xsl:variable>
<output>
<xsl:copy-of select="exsl:node-set($t1)/output/* | exsl:node-set($t3)/output/*" />
</output>
<xsl:copy-of select="exsl:node-set($t3)/extra" />
</xsl:when>
<xsl:when test="$n">
<extra><xsl:value-of select="$n" /></extra>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="object">
<!-- Input like: { X } bla -->
<!-- output like: <so:output>fields(X)</so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" select="''" />
<xsl:variable name="t1" select="normalize-space(substring-after($json-in,'{'))" />
<xsl:variable name="t2">
<xsl:call-template name="fields">
<xsl:with-param name="json-in" select="$t1" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t3" select="normalize-space(substring-after( exsl:node-set($t2)/extra, '}'))" />
<output>
<xsl:choose>
<xsl:when test="$parent-ele">
<xsl:element name="{$parent-ele}">
<xsl:copy-of select="exsl:node-set($t2)/output/node()" />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="exsl:node-set($t2)/output/node()" />
</xsl:otherwise>
</xsl:choose>
</output>
<xsl:if test="$t3">
<extra><xsl:value-of select="$t3" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="objects">
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="n" select="normalize-space($json-in)" />
<xsl:choose>
<xsl:when test="substring($n,1,1) = '{'">
<xsl:variable name="t1">
<xsl:call-template name="object">
<xsl:with-param name="json-in" select="$n" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t2" select="normalize-space( exsl:node-set($t1)/extra) " />
<xsl:variable name="t3">
<xsl:choose>
<xsl:when test="substring($t2,1,1)=','">
<xsl:call-template name="objects">
<xsl:with-param name="json-in" select="normalize-space(substring-after($t2,','))" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$t2">
<extra><xsl:value-of select="$t2" /></extra>
</xsl:when>
</xsl:choose>
</xsl:variable>
<output>
<xsl:copy-of select="exsl:node-set($t1)/output/* | exsl:node-set($t3)/output/*" />
</output>
<xsl:copy-of select="exsl:node-set($t3)/extra" />
</xsl:when>
<xsl:when test="$n">
<extra><xsl:value-of select="$n" /></extra>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="array">
<!-- Input like: [ X1 X2 ] bla -->
<!-- output like: <so:output><Y>X1</Y><Y>X2</Y></so:output> <so:extra>}bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="t1" select="normalize-space(substring-after($json-in,'['))" />
<xsl:variable name="t2">
<xsl:call-template name="objects">
<xsl:with-param name="json-in" select="$t1" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="t3" select="normalize-space(substring-after( exsl:node-set($t2)/extra, ']'))" />
<xsl:copy-of select="exsl:node-set($t2)/output" />
<xsl:if test="$t3">
<extra><xsl:value-of select="$t3" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="value">
<!-- Input like either array, object or string -->
<!-- output like either array, object or string -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="first-letter" select="substring(normalize-space($json-in),1,1)" />
<xsl:choose>
<xsl:when test="$first-letter='{'">
<xsl:call-template name="object">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$first-letter='['">
<xsl:call-template name="array">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$first-letter=$quot">
<xsl:call-template name="string">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:when test="$first-letter='0' or $first-letter='1' or $first-letter='2' or $first-letter='3' or $first-letter='4' or $first-letter='5' or $first-letter='6' or $first-letter='7' or $first-letter='8' or $first-letter='9'">
<xsl:call-template name="entero">
<xsl:with-param name="json-in" select="$json-in" />
<xsl:with-param name="parent-ele" select="$parent-ele" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<output>ERROR</output>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="string">
<!-- Input like: "X" bla -->
<!-- output like: <so:output><Y>X</Y></so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="value" select="substring-before(substring-after($json-in,$quot),$quot)" />
<xsl:variable name="remainder" select="normalize-space(substring-after(substring-after($json-in,$quot),$quot))" />
<output>
<xsl:element name="{$parent-ele}">
<xsl:value-of select="$value" />
</xsl:element>
</output>
<xsl:if test="$remainder">
<extra><xsl:value-of select="$remainder" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="entero">
<!-- Input like: "X" bla -->
<!-- output like: <so:output><Y>X</Y></so:output> <so:extra>bla</so:extra> -->
<xsl:param name="json-in" />
<xsl:param name="parent-ele" />
<xsl:variable name="value">
<xsl:call-template name="loopNumber">
<xsl:with-param name="json-in" select="$json-in" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="remainder" select="normalize-space(substring-after($json-in,$value))" />
<output>
<xsl:element name="{$parent-ele}">
<xsl:value-of select="$value" />
</xsl:element>
</output>
<xsl:if test="$remainder">
<extra><xsl:value-of select="$remainder" /></extra>
</xsl:if>
</xsl:template>
<xsl:template name="loopNumber">
<xsl:param name="json-in" />
<xsl:variable name="first-number" select="substring(normalize-space($json-in),1,1)" />
<xsl:choose>
<xsl:when test="$first-number='0' or $first-number='1' or $first-number='2' or $first-number='3' or $first-number='4' or $first-number='5' or $first-number='6' or $first-number='7' or $first-number='8' or $first-number='9'">
<xsl:variable name="t1">
<xsl:call-template name="loopNumber">
<xsl:with-param name="json-in" select="substring-after($json-in,$first-number)" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="concat($first-number,t1)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Aplicado al sgte JSON (OJO A LA ETIQUETA ENVOLVENTE, es necesario que exista al menos esta etiqueta sin importar el nombre de esta):
<JsonInput>{
"informacion": {
"persona": {
"numeroDocumento": "123456",
"nombres": {
"Nombre": "Wilfer",
"Apellido": "Giraldo",
}
},
"estadoPersona": "ACTIVA",
"correosElectronicos": [{
"correo": "leuco18",
"servidor": "Hotmail.com",
"fecha": "28/07/2010"
},
{
"correo": "leuco18",
"servidor": "Google.com",
"fecha": "01/05/2008"
},
{
"correo": "leuco18",
"servidor": "Facebook",
"fecha": "12/09/2012"
}],
"otrosDatos": "NO"
}
}</JsonInput>
"informacion": {
"persona": {
"numeroDocumento": "123456",
"nombres": {
"Nombre": "Wilfer",
"Apellido": "Giraldo",
}
},
"estadoPersona": "ACTIVA",
"correosElectronicos": [{
"correo": "leuco18",
"servidor": "Hotmail.com",
"fecha": "28/07/2010"
},
{
"correo": "leuco18",
"servidor": "Google.com",
"fecha": "01/05/2008"
},
{
"correo": "leuco18",
"servidor": "Facebook",
"fecha": "12/09/2012"
}],
"otrosDatos": "NO"
}
}</JsonInput>
Obtiene Como resultado el Sgte XML:
<informacion>
<persona>
<numeroDocumento>123456</numeroDocumento>
<nombres>
<Nombre>Wilfer</Nombre>
<Apellido>Giraldo</Apellido>
</nombres>
</persona>
<estadoPersona>ACTIVA</estadoPersona>
<correosElectronicos>
<correo>leuco18</correo>
<servidor>Hotmail.com</servidor>
<fecha>28/07/2010</fecha>
</correosElectronicos>
<correosElectronicos>
<correo>leuco18</correo>
<servidor>Google.com</servidor>
<fecha>01/05/2008</fecha>
</correosElectronicos>
<correosElectronicos>
<correo>leuco18</correo>
<servidor>Facebook</servidor>
<fecha>12/09/2012</fecha>
</correosElectronicos>
<otrosDatos>NO</otrosDatos>
</informacion>
<persona>
<numeroDocumento>123456</numeroDocumento>
<nombres>
<Nombre>Wilfer</Nombre>
<Apellido>Giraldo</Apellido>
</nombres>
</persona>
<estadoPersona>ACTIVA</estadoPersona>
<correosElectronicos>
<correo>leuco18</correo>
<servidor>Hotmail.com</servidor>
<fecha>28/07/2010</fecha>
</correosElectronicos>
<correosElectronicos>
<correo>leuco18</correo>
<servidor>Google.com</servidor>
<fecha>01/05/2008</fecha>
</correosElectronicos>
<correosElectronicos>
<correo>leuco18</correo>
<servidor>Facebook</servidor>
<fecha>12/09/2012</fecha>
</correosElectronicos>
<otrosDatos>NO</otrosDatos>
</informacion>
Espero te sea util este codigo XSL,No olvides de dejar un comentario
Muy buen aporte!
ResponderEliminar