WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: int5749 on January 03, 2017, 08:48:38 AM

Title: Working with/Change XML File Data
Post by: int5749 on January 03, 2017, 08:48:38 AM
Hi all,

Happy New Year to all of you  ;)

again I stuck to work with XML-Files and cannot find any help in this Forum or Tech Board  :(

I have an existing XML files which contains many Sections and Child Objects which have to be modified.
I have to

1) read value from specific Object (which I managed to work, but...)
2) write back a different Value
3) check for existing Child Object an create if it doesn't exist.

Any help is much apprecitated

Regards
Joerg
Title: Re: Working with/Change XML File Data
Post by: td on January 03, 2017, 10:06:04 AM
Perhaps take another look at the Tech Database.  Just searching on 'XML' produces many hits.  There are examples of using COM Automation's  "Msxml2.DOMDocument.x.x" object, using the third party "DOM Extender", and using the dotNet Framwork's "System.Xml" assembly to parse and/or modify XML files.  Of course, if you choose to role-your-own, WinBatch has numerous built-in file processing functions. 
Title: Re: Working with/Change XML File Data
Post by: td on January 03, 2017, 01:03:58 PM
A few of the many examples:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~XML+Edit~an~Existing~XML~File.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~XML+Edit~an~Existing~XML~File.txt)

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/_Third~Party~Extenders/DOM+DOM~Extender.txt
(http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/_Third~Party~Extenders/DOM+DOM~Extender.txt)
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/dotNet/System_XML+ReadXmlFile~Sample.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/dotNet/System_XML+ReadXmlFile~Sample.txt)
Title: Re: Working with/Change XML File Data
Post by: int5749 on January 10, 2017, 10:56:13 PM
Hi,

many thanks for guiding me to another direction ;-)
I start using XML Extender now and this works for my purposes to add/delete/modify nodes.

Regards
Joerg
Title: Re: Working with/Change XML File Data
Post by: JTaylor on January 11, 2017, 01:41:59 PM
Keep in mind that it does not handle Unicode data.

Jim