Giter Site home page Giter Site logo

Comments (6)

leethomason avatar leethomason commented on June 28, 2024

Good catch.

from tinyxml2.

leethomason avatar leethomason commented on June 28, 2024

Just pushed the fix.

from tinyxml2.

akahlich avatar akahlich commented on June 28, 2024

I still get the failure with newly downloaded tinyxml2.cpp . I have attribute names that begin with underscores, so that is my interest (attributes beginning with colons I can take or leave at this point).

I found I needed to add to a line in "char* XMLElement::ParseAttributes( char* p )" in tinyxml2.cpp line 1325, where the first character of the attribute name is tested. The change I needed is from:

if ( XMLUtil::IsAlpha( *p ) ) {

to

if ( XMLUtil::IsAlpha( *p ) || *p == '_' ) {

from tinyxml2.

akahlich avatar akahlich commented on June 28, 2024

After looking at the code of "char* XMLElement::ParseAttributes( char* p )" a little more, perhaps a change of order of the 'if' tests after SkipWhiteSpace would allow parsing of the attribute as the last else condition in the chain. This would keep the notion of what a valid first character of an attribute is completely contained within StrPair::ParseName( char* p) as called by XMLAttribute::ParseDeep( char * p, bool processEntities ) rather than having to duplicate the notion within XMLElement::ParseAttributes( char* p ) before deciding to call XMLAttribute::ParseDeep( ... ).

Just a thought ...

from tinyxml2.

leethomason avatar leethomason commented on June 28, 2024

Could you provide a test case for xmltest.cpp? Pull request is best, although a bit of code snippet is good too. It's best if a bug has bounced like this if I have a simple, concrete test case to make sure it's resolved.

from tinyxml2.

leethomason avatar leethomason commented on June 28, 2024

Closing. Gone stale, although I'd still like a test case if this resurfaces.

from tinyxml2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.