The XML library provides an XMLReader object that can read XML data from a suitably formatted file and an XMLWriter object that can write XML data to a file. Actually these objects are thin wrappers that expose the .NET XmlReader and XmlWriter classes to Basic4ppc. This library requires .NET 2.0 or later.
There is a (sort of - I don't really understand XML) demo, help and source for merging in the archive. If anyone who understands XML needs more functionality then post here and I will try to add it. If you can reference the MSDN docs on XMLReader XmlReader Members (System.Xml) and XmlWriter Members (System.Xml) then that would be useful.
EDIT :- Rapid update to version 1.1 with ReadString added to XMLReader and WriteCData added to XMLWriter as suggested by DaveW and corwin42. Thanks to both.
EDIT:- Version 1.2 posted with some additional navigational methods exposed for XmlReader See post #13.
EDIT:- Version 2.0 posted with some additional overloads for XmlWriter.WriteStartElement exposed and new XmlDocument and XmlNode objects. The XmlDocumentDemo uses StringBuilder from my http://www.b4x.com/forum/additional-libraries/2022-stringsex-library.html#post10957 See posts #24 and #25
EDIT:- Minor update to version 2.1. See post#27
EDIT:- Updated to version 2.2. See post #33.
EDIT:- Updated to version 2.3. See post #39.
EDIT:- Updated to version 2.4. See post #43.
EDIT:- Updated to version 2.5. See post #59.
EDIT:- Updated to version 2.6. See post #61.
There is a (sort of - I don't really understand XML) demo, help and source for merging in the archive. If anyone who understands XML needs more functionality then post here and I will try to add it. If you can reference the MSDN docs on XMLReader XmlReader Members (System.Xml) and XmlWriter Members (System.Xml) then that would be useful.
EDIT :- Rapid update to version 1.1 with ReadString added to XMLReader and WriteCData added to XMLWriter as suggested by DaveW and corwin42. Thanks to both.
EDIT:- Version 1.2 posted with some additional navigational methods exposed for XmlReader See post #13.
EDIT:- Version 2.0 posted with some additional overloads for XmlWriter.WriteStartElement exposed and new XmlDocument and XmlNode objects. The XmlDocumentDemo uses StringBuilder from my http://www.b4x.com/forum/additional-libraries/2022-stringsex-library.html#post10957 See posts #24 and #25
EDIT:- Minor update to version 2.1. See post#27
EDIT:- Updated to version 2.2. See post #33.
EDIT:- Updated to version 2.3. See post #39.
EDIT:- Updated to version 2.4. See post #43.
EDIT:- Updated to version 2.5. See post #59.
EDIT:- Updated to version 2.6. See post #61.
Attachments
Last edited: