SteveDunn/Gleed2D — Issue #9: problem including the xml output file into wp7 xna game
Author: sherifkandeel
Created: 2012-01-29 06:15:14+00:00
State: open

Hi, I tried to include the level I made from the tool and saved as .XML into my game, here's what I did:

1-referenced the wp7 Gleed2D.InGame assembly into my solution
2-put the XML file in the content directory
3-I put this snippet in the initialize() method:
Stream stream = TitleContainer.OpenStream("leveltest.xml");
XElement xml = XElement.Load(stream);
Level level = LevelLoader.Load(xml);

It gives the error :
XML is not in the XNA intermediate format. Missing XnaContent root element.

I tried to add:
< XnaContent>
< Asset Type="Gleed2D.InGame.Level" >

to the beginning of the XML file, but it also gives an error ... I'm not sure how to implement the level I made in the editor, and the above is the exact steps I followed, any idea ?