links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Reading a XML file
Last updated at 11:09 pm UTC on 4 September 2016
 f := FileStream fileNamed: 'MyXml.xml'. "opening a stream"
 doc := XMLDOMParser parseDocumentFrom: f.
 f close.
 xmlUser := (doc elements) at: 1. "now you have the entire user data"
 "read the name"
 elmt := xmlUser firstTagNamed: #name.
 userName := elmt contentString.