> I think this should fix it:
> >>> import javax.xml.parsers.*
> >>> docBuilder = DocumentBuilderFactory.newInstance()
> docBuilder.setNamespaceAware(true)
> >>> docElement = docBuilder.newDocumentBuilder().parse('test.xgtf').getDocumentElement()
> >>> parser = viper.api.impl.ViperParser
> >>> parser.parseDoc(docElement)
> David Mihalcik
> On Tue, Sep 15, 2009 at 4:13 AM, Douglas <dug.armad...@googlemail.com> wrote:
> > Hi,
> > I was nearly going to give up but I seem to have made some small
> > progress in importing ViPER data into Matlab. However, I am
> > stuck again. I hope that you, or somone, can assist.
> > Sorry, if you are seeing this question again. I tagged it onto the end
> > of a previous post then realised it deserves a new subject.
> > This is what I have done in Matlab:
> >>> import javax.xml.parsers.*
> >>> docBuilder = DocumentBuilderFactory.newInstance()
> >>> docElement = docBuilder.newDocumentBuilder().parse('test.xgtf').getDocumentElement()
> >>> parser = viper.api.impl.ViperParser
> >>> parser.parseDoc(docElement)
> > 14-Sep-2009 15:26:41 viper.api.datatypes.Lvalue setConfig
> > WARNING: lvalues should enumerate all possible values in the <lvalue-
> > possibles> tag.
> > 14-Sep-2009 15:26:41 viper.api.impl.ViperParser parseAttr
> > SEVERE: Missing important XML attribute.
> > java.lang.NullPointerException
> > at viper.api.impl.ViperParser.parseAttr(Unknown Source)
> > at viper.api.impl.ViperParser.parseAttrs(Unknown Source)
> > at viper.api.impl.ViperParser.parseSourcefile(Unknown Source)
> > at viper.api.impl.ViperParser.parseData(Unknown Source)
> > at viper.api.impl.ViperParser.parseDoc(Unknown Source)
> > 14-Sep-2009 15:26:41 viper.api.impl.ViperParser parseAttr
> > SEVERE: Missing important XML attribute.
> > java.lang.NullPointerException
> > ......
> > And the xml file is:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <viper xmlns="http://lamp.cfar.umd.edu/viper#" xmlns:data="http://
> > lamp.cfar.umd.edu/viperdata#">
> > <config>
> > <descriptor name="Information" type="FILE">
> > <attribute dynamic="false" name="SOURCETYPE" type="http://
> > lamp.cfar.umd.edu/viperdata#lvalue">
> > <data:lvalue-possibles>
> > <data:lvalue-enum value="SEQUENCE"/>
> > <data:lvalue-enum value="FRAMES"/>
> > </data:lvalue-possibles>
> > </attribute>
> > <attribute dynamic="false" name="NUMFRAMES" type="http://
> > lamp.cfar.umd.edu/viperdata#dvalue"/>
> > <attribute dynamic="false" name="FRAMERATE" type="http://
> > lamp.cfar.umd.edu/viperdata#fvalue"/>
> > <attribute dynamic="false" name="H-FRAME-SIZE"
> > type="http://lamp.cfar.umd.edu/viperdata#dvalue"/>
> > <attribute dynamic="false" name="V-FRAME-SIZE"
> > type="http://lamp.cfar.umd.edu/viperdata#dvalue"/>
> > </descriptor>
> > <descriptor name="People" type="OBJECT">
> > <attribute dynamic="false" name="Bounding box"
> > type="http://lamp.cfar.umd.edu/viperdata#circle"/>
> > </descriptor>
> > </config>
> > <data>
> > <sourcefile filename="file:/C:/Documents%20and%20Settings/
> > dougmacd/Desktop/testSequence/test_images/test_images.info">
> > <file id="0" name="Information">
> > ......ETC
> > I feel I am so close to getting this working.
> > Thank you for your kind help,
> > Douglas