XMLDocument.Constructor(XML as String)

From Xojo Documentation

Revision as of 20:34, 29 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


XMLDocument.Constructor(XML as String)

Parses the passed XML string into the document.


This example loads the following XML, contained in a constant called kXml, into a new XMLDocument:

 <?xml version="1.0" encoding="UTF-8"?>
 	<Team name="Seagulls">
 		<Player name="Bob" position="1B" />
 		<Player name="Tom" position="2B" />
 	<Team name="Pigeons">
 		<Player name="Bill" position="1B" />
 		<Player name="Tim" position="2B" />
 	<Team name="Crows">
 		<Player name="Ben" position="1B" />
 		<Player name="Ty" position="2B" />
// Load XML
Var xml As New XmlDocument
Catch e As XmlException
MessageBox("XML error: " + e.Message)
End Try