Logo Search packages:      
Sourcecode: lttoolbox version File versions

void Compiler::skip ( string &  name,
string const &  elem 
) [private]

Skip all document text nodes before "elem"

Parameters:
name the name of the node
elem the name of the expected node

Definition at line 324 of file Compiler.C.

References allBlanks(), latin1(), and reader.

Referenced by procTransduction().

{
  xmlTextReaderRead(reader);
  name = latin1(xmlTextReaderConstName(reader));
  
  while(name == "#text" || name == "#comment")
  {
    if(name != "#comment")
    {
      if(!allBlanks())
      {
        cerr << "Error (" << xmlTextReaderGetParserLineNumber(reader);
        cerr << "): Invalid construction." << endl;
        exit(EXIT_FAILURE);
      }
    }
    xmlTextReaderRead(reader);
    name = latin1(xmlTextReaderConstName(reader));
  }    
    
  if(name != elem)
  {
    cerr << "Error (" << xmlTextReaderGetParserLineNumber(reader);
    cerr << "): Expected '<" << elem << ">'." << endl;
    exit(EXIT_FAILURE);
  }  
}


Generated by  Doxygen 1.6.0   Back to index