org.davesag.generica.util.xml
Class MediaXmlParser

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.davesag.generica.util.xml.AbstractXmlParser
          extended byorg.davesag.generica.util.xml.MediaXmlParser
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XmlParser

public class MediaXmlParser
extends AbstractXmlParser

The MediaXmlParser turns an incoming xml text stream into a List of Media objects. Media is represented in XML in the form

          <media name="a nice piccie"
                  mime-type="image/jpg"
                  source-url="some url to link back to to get the actual media file."
                  linkback-url="some other url to display the media file in context">
                  <meta-data name="soemthing" value="something else"/>
          </media>
 

Since:
Generica 0.5.4
Version:
CVS Revision $Id: MediaXmlParser.java,v 1.4 2004/03/30 13:00:43 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Nested Class Summary
 
Nested classes inherited from class org.davesag.generica.util.xml.XmlParser
XmlParser.Factory
 
Field Summary
 
Fields inherited from class org.davesag.generica.util.xml.AbstractXmlParser
theContent, theCurrentItem, theList, theParser
 
Constructor Summary
MediaXmlParser()
           
 
Method Summary
 void endElement(String uri, String local, String qName)
          Called when the End Element is encountered.
 void startElement(String uri, String local, String qName, Attributes atts)
          Called when the Start Element is encountered.
 
Methods inherited from class org.davesag.generica.util.xml.AbstractXmlParser
add, characters, getBuffer, getCurrentItem, getList, getParser, parse, parse, parseString, resetBuffer, setCurrentItem, setParser
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaXmlParser

public MediaXmlParser()
Method Detail

startElement

public void startElement(String uri,
                         String local,
                         String qName,
                         Attributes atts)
Called when the Start Element is encountered.

Parameters:
uri - the uri
local - dunno
qName - the tag name
atts - attributes

endElement

public void endElement(String uri,
                       String local,
                       String qName)
Called when the End Element is encountered.

Parameters:
uri - the uri
local - dunno
qName - the tag name


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.