Menu

#106 tutorial example does not compile 2.6.0

closed-fixed
nobody
None
5
2010-03-23
2010-03-21
Kim Jarvis
No

The cut and paste tutorial example no longer compiles.

In version 2.5.3 the dump example compiles and executes as expected. However, in 2.6.0:

../src/xmlparm00.cpp(76): error: class "TiXmlNode" has no member "DOCUMENT"
case TiXmlNode::DOCUMENT:
^

../src/xmlparm00.cpp(80): error: class "TiXmlNode" has no member "ELEMENT"
case TiXmlNode::ELEMENT:
^

../src/xmlparm00.cpp(91): error: class "TiXmlNode" has no member "COMMENT"
case TiXmlNode::COMMENT:
^

../src/xmlparm00.cpp(95): error: class "TiXmlNode" has no member "UNKNOWN"
case TiXmlNode::UNKNOWN:
^

../src/xmlparm00.cpp(99): error: class "TiXmlNode" has no member "TEXT"
case TiXmlNode::TEXT:
^

../src/xmlparm00.cpp(104): error: class "TiXmlNode" has no member "DECLARATION"
case TiXmlNode::DECLARATION

2.6.0 builds correctly and all tests complete.

I suggest that, as the dump tutorial is added to the tests. That is, the header is copied into xmltest.cpp.
The tutorial is the first thing new users try so it is important to ensure that it works in each new release.

Discussion

  • Lee Thomason

    Lee Thomason - 2010-03-22

    Kim -
    None of the code throwing errors has changed, and much more aggressive test code was unaffected by the changes. What example are you using? (could you include the link?)

    lee

     
  • Lee Thomason

    Lee Thomason - 2010-03-22
    • status: open --> pending
     
  • Kim Jarvis

    Kim Jarvis - 2010-03-22

    I used a cut and past of the Full listing for dump_to_stdout tutorial at:

    http://www.grinninglizard.com/tinyxmldocs/tutorial0.html

     
  • Kim Jarvis

    Kim Jarvis - 2010-03-22
    • status: pending --> open
     
  • Lee Thomason

    Lee Thomason - 2010-03-23
    • status: open --> closed-fixed
     
  • Lee Thomason

    Lee Thomason - 2010-03-23

    Thanks - interestingly, it's been broken since 2007. And the tutorial doesn't reflect current best practices - more to be done here. Nevertheless, I uploaded a fixed version.

     

Log in to post a comment.