Ver Mensaje Individual
  #6  
Antiguo 20-10-2010
nejamube nejamube is offline
Miembro
 
Registrado: nov 2009
Ubicación: Buenos Aires
Posts: 65
Reputación: 17
nejamube Va por buen camino
Thumbs up Duda acerca de nodos XML

Hola.

Intentando de otra forma he obtenido la siguiente estructura en el XML.

Código PHP:
<DATAPACKET Version="2.0">
&
#8722;
<METADATA>
&
#8722;
<FIELDS>
<
FIELD attrname="CAJA" fieldtype="i4" required="true"/>
<
FIELD attrname="NUMERO" fieldtype="i4" required="true"/>
<
FIELD attrname="FECHA" fieldtype="date" required="true"/>
<
FIELD attrname="HORA" fieldtype="time" required="true"/>
<
FIELD attrname="ESTATUS" fieldtype="string" WIDTH="7" required="true"/>
<
FIELD attrname="SUBTOTAL" fieldtype="r8"/>
<
FIELD attrname="IVA" fieldtype="r8"/>
<
FIELD attrname="TOTAL" fieldtype="r8" required="true"/>
</
FIELDS>
<
PARAMS DEFAULT_ORDER="1" PRIMARY_KEY="1" LCID="1033"/>
</
METADATA>
&
#8722;
<ROWDATA>
<
ROW Caja="1" Remisión="1" Fecha="20101020" Hora="10:58:21:000" Estatus="A" Subtotal="9" I.V.A.="0.99" Total="9.99"/>
<
ROW Caja="1" Remisión="2" Fecha="20101020" Hora="10:58:30:000" Estatus="A" Subtotal="18" I.V.A.="1.98" Total="19.98"/>
</
ROWDATA>
</
DATAPACKET
Lo que necesito es que despues de el nodo Field se despliegue otro nodo llamado Fields de la siguiente manera:

Código PHP:
<DATAPACKET Version="2.0">
&
#8722;
<METADATA>
&
#8722;
<FIELDS>
<
FIELD attrname="Version" fieldtype="i2"/>
<
FIELD attrname="Tipo" fieldtype="string" WIDTH="2"/>
<
FIELD attrname="Cadena" fieldtype="string" WIDTH="2"/>
<
FIELD attrname="Terminos" fieldtype="string" WIDTH="120"/>
&
#8722;
<FIELD attrname="Algomas" fieldtype="nested">
&
#8722;
<FIELDS>
<
FIELD attrname="Cuenta" fieldtype="string" WIDTH="21"/>
<
FIELD attrname="Depto" fieldtype="integer"/>
<
FIELD attrname="Concepto" fieldtype="string" WIDTH="120"/>
<
FIELD attrname="Monto" fieldtype="float"/>
<
FIELD attrname="Cambio" fieldtype="r8"/>
<
FIELD attrname="Hayer" fieldtype="string" WIDTH="1"/>
</
FIELDS>
<
PARAMS/> 
He intentado de muchas formas pero no he logrado mi proposito.

Muchas gracias.
Responder Con Cita