locked
Xml type attribute problem... RRS feed

  • Question

  • I was messing around with some data sources and one of my friends has an xml service which is in "real" xml. it basically looks like this...

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <root>
    <row>
    <timestamp type="time">2009-09-01T06:30:00Z</timestamp>
    <sequenceNumber type="integer">1</sequenceNumber>
    <FRUIT type="string">Apple</FRUIT>
    <WEIGHT type="integer">2</WEIGHT>
    </row>
    <row>
    <timestamp type="time">2009-09-01T06:30:00Z</timestamp>
    <sequenceNumber type="integer">2</sequenceNumber>
    <FRUIT type="string">Pear</FRUIT>
    <WEIGHT type="integer">3</WEIGHT>
    </row>
    <row>
    <timestamp type="time">2009-09-01T06:30:00Z</timestamp>
    <sequenceNumber type="integer">3</sequenceNumber>
    <FRUIT type="string">Orange</FRUIT>
    <WEIGHT type="integer">4</WEIGHT>
    </row>
    </root>
    

    Now when i import this into Blend as an XML data file I cannot simply drag and drop the collection onto the screen and have it turn into a listbox of the data being displayed like I can with other XML data such as the data generated by the built in sample data generation stuff in Blend. So after some playing around I discovered it doesn't like the type attribute being there. I'm not an XML expert but my buddy says this is 100% pure correct xml. Is this just a bug in Blend or just not fully implemented feature of blend or is my buddy wrong about it being completely valid XML?

    Is there a way to get around the type attribute being there simply?


    Mishkin Faustini -- Multi-talented Developer and Designer -- http://www.thedirtydeveloper.com (my WP7 Dev blog) http://www.MishkinFaustini.com
    Tuesday, July 13, 2010 6:33 PM

All replies

  • Hi there,

    When I tried this scenario, it seemed to work fine for me. Some questions:

    a) I am guessing you are creating a WPF 4 project, is that correct?

    b) Are you doing the following steps:

    Create XML data source
    Select root->row->Fruit->type
    Drag and drop onto the design surface

    Thanks,
    Unni


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 14, 2010 1:08 AM
  • It works without errors but it is not displaying the correct information. Without any type attributes I have a listbox with all the fruit information. With the type attribute I get a listbox with....

    "Expression.blend.SampleData.SampleDataSource.row1

    Expression.blend.SampleData.SampleDataSource.row2

    Expression.blend.SampleData.SampleDataSource.row3

    "

     

    Btw i am using Microsoft Expression Blend 4 for Windows Phone 7 (beta)


    Mishkin Faustini -- Multi-talented Developer and Designer -- http://www.thedirtydeveloper.com (my WP7 Dev blog) http://www.MishkinFaustini.com
    Wednesday, July 14, 2010 4:39 PM