Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Importing data to matlab - Missing important XML attribute
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Douglas  
View profile  
 More options Sep 15, 4:13 am
From: Douglas <dug.armad...@googlemail.com>
Date: Tue, 15 Sep 2009 01:13:56 -0700 (PDT)
Local: Tues, Sep 15 2009 4:13 am
Subject: Importing data to matlab - Missing important XML attribute
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Mihalcik  
View profile  
 More options Sep 15, 7:40 am
From: David Mihalcik <kraka...@gmail.com>
Date: Tue, 15 Sep 2009 07:40:11 -0400
Local: Tues, Sep 15 2009 7:40 am
Subject: Re: Importing data to matlab - Missing important XML attribute
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Douglas  
View profile  
 More options Sep 15, 11:21 am
From: Douglas <dug.armad...@googlemail.com>
Date: Tue, 15 Sep 2009 08:21:19 -0700 (PDT)
Local: Tues, Sep 15 2009 11:21 am
Subject: Re: Importing data to matlab - Missing important XML attribute
Brilliant! It works!

On Sep 15, 12:40 pm, David Mihalcik <kraka...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google