IonicWind Software

IWBasic => General Questions => Topic started by: Andy on January 28, 2014, 05:57:06 AM

Title: XML files
Post by: Andy on January 28, 2014, 05:57:06 AM
Hi,

Larry did some work with XML files which I have just come across and was having a look at, it's good work as always but I have some questions about it.

Looking at example xmlExample3.eba how could you change the name,value,attribute etc of "warehouse"  in Demo1a.xml:

-<line-item no.="1">
    <part-number warehouse="Houston">B88-154D</part-number>
    <description>Wigit, 6", Left Handed</description>
    <qty>10000</qty>

rather than deleting the "warehouse" attribute?

Also, to try this do I still have to use my copy of Ebasic or can I do this in IWB+ ?

Just trying to get my head around xml files.
???

The eba and xml files are attatched in a zip file.

Thanks,
Andy.
Title: Re: XML files
Post by: LarryMc on January 28, 2014, 09:19:39 AM
Look a t the first few of examples and where it says GetDat or GetAtt use PutDat and PutAtt to change the contents.

However you can't change
"part-number warehouse"
to
"part-number retailstore"
without deleting the old and adding the new including all the child nodes.

you can change
<part-number warehouse="Houston">
to <part-number warehouse="Houston">
if zz.PutAtt("warehouse","Dallas") <> 0 then zz.ErrMsg()

It's the same sort of thing with changing B88-154D but you use it with PutDat