Comments (6)
Good catch.
from tinyxml2.
Just pushed the fix.
from tinyxml2.
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.
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.
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.
Closing. Gone stale, although I'd still like a test case if this resurfaces.
from tinyxml2.
Related Issues (20)
- Turkish Characters Support HOT 1
- When will tinyxml release a new version? HOT 1
- Assessment of the difficulty in porting CPU architecture for tinyXML2 HOT 1
- Support for char8_t and std::u8string HOT 2
- Using IntText(); HOT 1
- FirstChildElement and namespace prefixes.
- Bug with XMLElement::Attribute - it returns 0 instead of "value" if it can't find the attribute -
- Is the Doxygen tagfile published anywhere?
- v10: MinGW DLL build behavior change
- porty guide from tinyxml1
- Tags for versions below 2.0.1
- `Error()` returns false for corrupted XML (when there is no starting tag) HOT 1
- Add xmake build system HOT 1
- xmltest.exe fail Error opening test file 'dream.xml'
- Compilation warnings
- tinyxml2 can not deal this text:   
- Adding gnbon to `auto_ccs` for OSS-Fuzz Integration
- invalid conversion from 'iso_s32*' {aka 'long int*'} to 'int*' [-fpermissive]
- Thanks for releasing version 10.0.0
- Real-Time XML Manipulation with TinyXML-2 in a College Project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyxml2.