libxml++: interactive read state loop



Hi team,

  I've recently got an issue with indefinite loop in a TextReader mode. Following abstract user code applies:
 while (reader->read()) {
       switch (reader->get_node_type()) {
             case xmlpp::TextReader::Element:
                ....
              case xmlpp::TextReader::EndElement:
                ....
              case xmlpp::TextReader::Text:
                ....
                 default: // all other things
                    ;
      }
 }

As you can see it does nothing if node type is None (this is true in case read state in Interactive). The problem is reader->read() returns true if I want to skip node with type None.

My questions are:
1. How TextReader can enter Interactive state and what does it mean?
2. What is the node type None? How to handle it properly?
3. Main question, if this is a BUG or a correct behavior when read() returns true and causes indefinite loop.

FYI: we are running SOAP server processing 3PP SOAP requests.

Hope for answer guys since this is major thing we met in our environment! Thanks in advance!

Aleksei.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]