!DOCTYPE declarations

2004-10-15
2013-05-20
  • Alexey Sokirko
    Alexey Sokirko
    2004-10-15

    I think, I had the same problem with TinyXml, and I hope, I have solved it somehow. You have to change a little bit  the function, which is called TiXmlUnknown::Parse (counting nestedness of "<",">"). So the main while cycle now should
    look like as follows:

    size_t nestedness = 1;   
    while (p  && *p &&    ( *p != '>'  || (nestedness > 1)  ))
    {
    value += *p;
    if (*p == '<')
       nestedness++;
    else
       if (*p == '>')
         nestedness--;

      ++p;
    }

     
  • Lance Drake
    Lance Drake
    2011-08-10

    Another thing which I would like to see from TinyXML is the specific mention of the legal inclusion of the well-formed XML header:

    <?xml version="1.0" encoding="UTF-8"?>
    

    So far, it does not appear to present a problem - but with all the caveats about what can NOT be included in a TinyXML document, it would be comforting to know that including the XML specifier as shown above would never present a problem.