PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WEBDEV 2024
→
Deserialize from XML
Deserialize from XML
Started by Henk, Nov., 15 2017 12:15 AM - No answer
Connect yourself…
Henk
#1
Posted on November, 15 2017 - 12:15 AM
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>
Report
0
0
→ Go back to WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text