ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > irrXML
forum topic indicator whitespace
person icon
Llock
Registered User
Quote
2009-02-02 03:58:52

I'm not exactly sure why, but I was getting lots of values being set that shouldn't. Basically, I removed the if check (against 3) in the top of setText.

That seemed to fix how almost every node was getting \n, \t, etc... and registering that it had text when it didn't.

Example:

     //! sets the state that text was found. Returns true if set should be set
     bool setText(char_type* start, char_type* end)
     {
                // Commented out the below if statement.
                // odds are, we won't spend a LOT of time in this loop, so it's ok since the first
                //  non whitespace char breaks out. - Llock
          //if (end - start)
          {
               char_type* p = start;
               for(; p != end; ++p)
                    if (!isWhiteSpace(*p))
                         break;

               if (p == end)
                    return false;
          }




Good engine, just wanted to file away any changes I'm making locally.

person icon
User
Guest
Quote
2012-12-10 20:05:28

This was the problem i discovered in my thread below... hope this helps those who come to it again.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |