Jump to content
  • Advertisement
Sign in to follow this  


This topic is 4088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm trying to dynamically allocate form controls at runtime. The first step is to parse Form Designer files generated by visual studio. I didnt encounter any problems while writing the xml file (using xmltextwriter) but reading seems to be tricky.

XmlTextReader reader = new XmlTextReader("titles.xml");
reader.WhitespaceHandling = WhitespaceHandling.Significant;
string nsName = reader.ReadElementString("namespace");
string className = reader.ReadElementString("class");
reader.ReadStartElement("statement"); // exception here
        <expression type>invocation</expression type>
            <expression type>boolean</expression type>

This is a simplified version of my xml file with only one statement but the problem is still there. (Exception: "< is unexpected token. The exptected token is '='") I think i have a problem with my xml format but i can't find the problem.

Share this post

Link to post
Share on other sites
I don't know if this is the only problem, but you can't have element names with spaces in them ("<expression type>"). Try something like expression_type.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!