Menu

TiXmlDocument::ErrorRow allways gives one

2004-02-27
2004-02-29
  • Joerg Blattner

    Joerg Blattner - 2004-02-27

    If I parse a file with
    ------------------------------
    string FileName("test.xml");
    TiXmlDocument doc(FileName);
    bool loadOkay = doc.LoadFile();
    if ( !loadOkay )
    {
    cerr << "File " << FileName << ": " <<   \   doc.ErrorDesc() << " Column: " << doc.ErrorCol() \
    << " Row: " << doc.ErrorRow();
    }
    ------------------------------
    and I have a syntax error in "test.xml" I receive the correct error string with doc.ErrorDesc() but doc.ErrorCol() and doc.ErrorRow() always return 1.

    If the parser encountered an error and was note able to get the location ErrorCol and ErrorRow should return 0 according to the Documentation.
    What am I doing wrong?

     
    • Joerg Blattner

      Joerg Blattner - 2004-02-29

      I found my mistake:
      The value I set with SetTabSize was wrong...

      blattjoe

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.