May 06, 2024, 03:55:52 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


XML files

Started by Andy, January 28, 2014, 05:57:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

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.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library