. .


ST 4U 246: Parsing XML in VA Smalltalk

June 15, 2012 10:48:41.990

Today's Smalltalk 4 You starts looking into the XML support in VA Smalltalk. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:


If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Today we'll start looking at the XML support in VA Smalltalk - what to load, and how to get started with it. In the Features list, you'll want to load two things:

  • XML Support
  • XML Examples

As a starting point, let's look at the base XML parser - we're going to read in a large XML file (something produced by BottomFeeder).


To get an XML Document, you just need to execute the following (note that we aren't using validation; if you have a schema, you can provide that and turn validation on):

parser := AbtXMLDOMParser newNonValidatingParser.
parser parseURI: 'v:\feeds.xml'.

The argument can be either a file path or URI. You should see something like this if you inspect that:


That's about it for today - we'll start doing some more involved work with XML over the next few screencasts.

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , ,

[st4u246-iPhone.m4v ( Size: 3005626 )]

posted by James Robertson

 Share Tweet This