FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WEBDEV 2024
→
Deserialize from XML
Deserialize from XML
Iniciado por Henk, 15,nov. 2017 00:15 - No hay respuesta
Conéctese…
Henk
#1
Publicado el 15,noviembre 2017 - 00:15
Hi all,
I use the deserialize to get an xml file in an array. This works very fine, quickly and less code. But when the XML get more then 3 node levels it's ot working anymore
Some one an idea?
Thanks in advance,
Henk
// Data stucture
stPriceUpdate is Structure
number is string
unitPrice is string
END
stPriceUpdate is stPriceUpdate
arrPriceUpdate is array of stPriceUpdate
// Get data from file
sDocName is string = "C:\Temp\PriceUpdate.xml"
sDocXml is string
sDocXml = fLoadText(sDocName)
// Get data in array (to produce)
Deserialize(arrPriceUpdate, sDocXml, psdXML)
// This is working very fine voor a XML file like this (2 levels <articles> and <article>)
<articles>
<article>
<number>12345</number>
<unitPrice>19.95</unitPrice>
</article>
<article>
<number>67890</number>
<unitPrice>7.50</unitPrice>
</article>
</articles>
// But now the shopstopper (with 3 levels <currency> , <articles> and <article> I het just one empty elmement in the array)
<currency>
<code>USD</code>
<articles>
<article>
<number>12345</number>
<unitPrice>19.95</unitPrice>
</article>
<article>
<number>67890</number>
<unitPrice>7.50</unitPrice>
</article>
</articles>
</currency>
Informar
0
0
→ Volver a WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto