// @(#)root/xmlparser:$Id$
// Author: Jose Lo   12/1/2005

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TSAXParser                                                           //
//                                                                      //
// TSAXParser is a subclass of TXMLParser, it is a wraper class to      //
// libxml library.                                                      //
//                                                                      //
// SAX (Simple API for XML) is an event based interface, which doesn't  //
// maintain the DOM tree in memory, in other words, it's much more      //
// efficient for large document.                                        //
//                                                                      //
// TSAXParserCallback contains a number of callback routines to the     //
// parser in a xmlSAXHandler structure. The parser will then parse the  //
// document and call the appropriate callback when certain conditions   //
// occur.                                                               //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


/*************************************************************************
  This source is based on libxml++, a C++ wrapper for the libxml XML
  parser library.Copyright (C) 2000 by Ari Johnson

  libxml++ are copyright (C) 2000 by Ari Johnson, and are covered by the
  GNU Lesser General Public License, which should be included with
  libxml++ as the file COPYING.
 *************************************************************************/

#include "TSAXParser.h"
#include "TXMLAttr.h"
#include "Varargs.h"
#include "TObjString.h"
#include "TList.h"
#include "TClass.h"

#include <libxml/parser.h>
#include <libxml/parserInternals.h>


class TSAXParserCallback {
public:
   static void StartDocument(void *fParser);
   static void EndDocument(void *fParser);
   static void StartElement(void *fParser, const xmlChar *name, const xmlChar **p);
   static void EndElement(void *fParser, const xmlChar *name);
   static void Characters(void *fParser, const xmlChar *ch, Int_t len);
   static void Comment(void *fParser, const xmlChar *value);
   static void CdataBlock(void *fParser, const xmlChar *value, Int_t len);
   static void Warning(void *fParser, const char *fmt, ...);
   static void Error(void *fParser, const char *fmt, ...);
   static void FatalError(void *fParser, const char *fmt, ...);
};


ClassImp(TSAXParser)

//______________________________________________________________________________
TSAXParser::TSAXParser()
{
   // Create SAX parser.

   fSAXHandler = new xmlSAXHandler;
   memset(fSAXHandler, 0, sizeof(xmlSAXHandler));

   fSAXHandler->startDocument =
                   (startDocumentSAXFunc)TSAXParserCallback::StartDocument;
   fSAXHandler->endDocument   =
                   (endDocumentSAXFunc)TSAXParserCallback::EndDocument;
   fSAXHandler->startElement  =
                   (startElementSAXFunc)TSAXParserCallback::StartElement;
   fSAXHandler->endElement    =
                   (endElementSAXFunc)TSAXParserCallback::EndElement;
   fSAXHandler->characters    =
                   (charactersSAXFunc)TSAXParserCallback::Characters;
   fSAXHandler->comment       =
                   (commentSAXFunc)TSAXParserCallback::Comment;
   fSAXHandler->cdataBlock    =
                   (cdataBlockSAXFunc)TSAXParserCallback::CdataBlock;
   fSAXHandler->warning       =
                   (warningSAXFunc)TSAXParserCallback::Warning;
   fSAXHandler->error         =
                   (errorSAXFunc)TSAXParserCallback::Error;
   fSAXHandler->fatalError    =
                   (fatalErrorSAXFunc)TSAXParserCallback::FatalError;
}

//______________________________________________________________________________
TSAXParser::~TSAXParser()
{
   // TSAXParser desctructor

   ReleaseUnderlying();

   delete fSAXHandler;
}

//______________________________________________________________________________
void TSAXParser::OnStartDocument()
{
   // Emit a signal for OnStartDocument.

   Emit("OnStartDocument()");
}

//______________________________________________________________________________
void TSAXParser::OnEndDocument()
{
   // Emit a signal for OnEndDocument.

   Emit("OnEndDocument()");
}

//______________________________________________________________________________
void TSAXParser::OnStartElement(const char *name, const TList *attributes)
{
   // Emit a signal for OnStarElement, where name is the Element's name and
   // attribute is a TList of (TObjString*, TObjString *) TPair's.
   // The TPair's key is the attribute's name and value is the attribute's
   // value.

   Long_t args[2];
   args[0] = (Long_t)name;
   args[1] = (Long_t)attributes;

   Emit("OnStartElement(const char *, const TList *)", args);
}

//______________________________________________________________________________
void TSAXParser::OnEndElement(const char *name)
{
   //Emit a signal for OnEndElement, where name is the Element's name.

   Emit("OnEndElement(const char *)", name);
}

//______________________________________________________________________________
void TSAXParser::OnCharacters(const char *characters)
{
   // Emit a signal for OnCharacters, where characters are the characters
   // outside of tags.

   Emit("OnCharacters(const char *)", characters);
}

//______________________________________________________________________________
void TSAXParser::OnComment(const char *text)
{
   // Emit a signal for OnComment, where text is the comment.

   Emit("OnComment(const char *)", text);
}

//______________________________________________________________________________
void TSAXParser::OnWarning(const char *text)
{
   // Emit a signal for OnWarning, where text is the warning.

   Emit("OnWarning(const char *)", text);
}

//______________________________________________________________________________
Int_t TSAXParser::OnError(const char *text)
{
   // Emit a signal for OnError, where text is the error and it returns the
   // Parse Error Code, see TXMLParser.

   Emit("OnError(const char *)", text);
   return -3;
}

//______________________________________________________________________________
Int_t TSAXParser::OnFatalError(const char *text)
{
   // Emit a signal for OnFactalError, where text is the error and it
   // returns the Parse Error Code, see TXMLParser.

   Emit("OnFatalError(const char *)", text);
   return -4;
}

//______________________________________________________________________________
void TSAXParser::OnCdataBlock(const char *text, Int_t len)
{
   // Emit a signal for OnCdataBlock.

   Long_t args[2];
   args[0] = (Long_t)text;
   args[1] = len;

   Emit("OnCdataBlock(const char *, Int_t)", args);
}

//______________________________________________________________________________
Int_t TSAXParser::Parse()
{
   // This function parses the xml file, by initializing the parser and checks
   // whether the parse context is created or not, it will check as well
   // whether the document is well formated.
   // It returns the parse error code, see TXMLParser.

   if (!fContext) {
      return -2;
   }

   xmlSAXHandlerPtr oldSAX = fContext->sax;
   fContext->sax = fSAXHandler;
   fContext->userData = this;

   InitializeContext();

   xmlParseDocument(fContext);

   fContext->sax = oldSAX;

   if (!fContext->wellFormed && fParseCode == 0) {
      fParseCode = -5;
   }

   ReleaseUnderlying();

   return fParseCode;
}

//______________________________________________________________________________
Int_t TSAXParser::ParseFile(const char *filename)
{
   // It creates the parse context of the xml file, where the xml file name is
   // filename. If context is created sucessfully, it will call Parse()
   // It returns parse error code, see TXMLParser.

   // Attempt to parse a second file while a parse is in progress.
   if (fContext) {
      return -1;
   }

   fContext = xmlCreateFileParserCtxt(filename);
   return Parse();
}

//______________________________________________________________________________
Int_t TSAXParser::ParseBuffer(const char *contents, Int_t len)
{
   // It parse the contents, instead of a file.
   // It will return error if is attempted to parse a second file while
   // a parse is in progres.
   // It returns parse code error, see TXMLParser.

   // Attempt to parse a second file while a parse is in progress.
   if (fContext) {
      return -1;
   }

   fContext = xmlCreateMemoryParserCtxt(contents, len);
   return Parse();
}


//--- TSAXParserCallback -------------------------------------------------------

//______________________________________________________________________________
void TSAXParserCallback::StartDocument(void *fParser)
{
   // StartDocument Callback function.

   TSAXParser *parser = (TSAXParser*)fParser;
   parser->OnStartDocument();
}

//______________________________________________________________________________
void TSAXParserCallback::EndDocument(void *fParser)
{
   // EndDocument callback function.

   TSAXParser *parser = (TSAXParser*)fParser;
   parser->OnEndDocument();
}

//______________________________________________________________________________
void TSAXParserCallback::StartElement(void *fParser, const xmlChar *name,
                                      const xmlChar **p)
{
   // StartElement callback function, where name is the name of the element
   // and p contains the attributes for the start tag.

   TSAXParser *parser = (TSAXParser*)fParser;
   TList *attributes = new TList;

   if (p) {
      for (const xmlChar **cur = p; cur && *cur; cur += 2) {
         attributes->Add(new TXMLAttr((const char*)*cur,
                                      (const char*)*(cur + 1)));
      }
   }

   parser->OnStartElement((const char*) name, attributes);

   attributes->Delete();
   delete attributes;
}

//______________________________________________________________________________
void TSAXParserCallback::EndElement(void *fParser, const xmlChar *name)
{
   // EndElement callback function, where name is the name of the element.

   TSAXParser *parser = (TSAXParser*)fParser;
   parser->OnEndElement((const char*) name);
}

//______________________________________________________________________________
void TSAXParserCallback::Characters(void *fParser, const xmlChar *ch,
                                    Int_t len)
{
   // Character callback function. It is called when there are characters that
   // are outside of tags get parsed and the context will be stored in ch,
   // len is the length of ch.

   TSAXParser *parser = (TSAXParser*)fParser;

   char *str = new char[len+1];
   strlcpy(str, (const char*) ch, len+1);
   str[len] = '\0';

   parser->OnCharacters(str);

   delete [] str;
}

//______________________________________________________________________________
void TSAXParserCallback::Comment(void *fParser, const xmlChar *value)
{
   // Comment callback function.
   // Comment of the xml file will be parsed to value.

   TSAXParser *parser = (TSAXParser*)fParser;
   parser->OnComment((const char*) value);
}

//______________________________________________________________________________
void TSAXParserCallback::Warning(void * fParser, const char *va_(fmt), ...)
{
   // Warning callback function. Warnings while parsing a xml file will
   // be stored at fmt.

   TSAXParser *parser = (TSAXParser*)fParser;

   va_list arg;
   char buffer[2048];

   va_start(arg, va_(fmt));
   vsnprintf(buffer, 2048, va_(fmt), arg);
   va_end(arg);

   TString buff(buffer);

   parser->OnWarning(buff.Data());
}

//______________________________________________________________________________
void TSAXParserCallback::Error(void *fParser, const char *va_(fmt), ...)
{
   // Error callback function. Errors while parsing a xml file will be stored
   // at fmt.

   Int_t errorcode;
   TSAXParser *parser = (TSAXParser*)fParser;

   va_list arg;
   char buffer[2048];

   va_start(arg, va_(fmt));
   vsnprintf(buffer, 2048, va_(fmt), arg);
   va_end(arg);

   TString buff(buffer);

   errorcode = parser->OnError(buff.Data());
   if (errorcode < 0) { //When error occurs, write fErrorCode
      parser->SetParseCode(errorcode);
   }

   if (errorcode < 0 && parser->GetStopOnError()) {
      //When GetStopOnError is enabled, stop the parse when an error occurs
      parser->StopParser();
   }
}

//______________________________________________________________________________
void TSAXParserCallback::FatalError(void *fParser, const char *va_(fmt), ...)
{
   // FactalError callback function. Factal errors while parsing a xml file
   // will be stored at fmt.

   Int_t errorcode;
   TSAXParser *parser = (TSAXParser*)fParser;

   va_list arg;
   char buffer[2048];

   va_start(arg, va_(fmt));
   vsnprintf(buffer, 2048, va_(fmt), arg);
   va_end(arg);

   TString buff(buffer);

   errorcode = parser->OnFatalError(buff);
   if (errorcode < 0) {
      parser->SetParseCode(errorcode);
      parser->StopParser();
   }
}

//______________________________________________________________________________
void TSAXParserCallback::CdataBlock(void *fParser, const xmlChar *value,
                                    Int_t len)
{
   // CdataBlock Callback function.

   TSAXParser *parser = (TSAXParser*)fParser;
   parser->OnCdataBlock((const char*)value, len);
}

//______________________________________________________________________________
void TSAXParser::ConnectToHandler(const char *handlerName, void *handler)
{
   // A default TSAXParser to a user-defined Handler connection function.
   // This function makes connection between various function from TSAXParser
   // with the user-define SAX Handler, whose functions has to be exactly the
   // same as in TSAXParser.
   //
   // handlerName is the user-defined SAX Handler class name
   // handler is the pointer to the user-defined SAX Handler
   //
   // See SAXHandler.C tutorial.

   const TString kFunctionsName [] = {
      "OnStartDocument()",
      "OnEndDocument()",
      "OnStartElement(const char *, const TList *)",
      "OnEndElement(const char *)",
      "OnCharacters(const char *)",
      "OnComment(const char *)",
      "OnWarning(const char *)",
      "OnError(const char *)",
      "OnFatalError(const char *)",
      "OnCdataBlock(const char *, Int_t)"
   };

   TClass *cl = TClass::GetClass(handlerName);

   for (Int_t i = 0; i < 10; i++) {
      if (CheckConnectArgs(this, this->IsA(), kFunctionsName[i],
                           cl, kFunctionsName[i]) != -1)
         Connect(kFunctionsName[i], handlerName, handler, kFunctionsName[i]);
   }
}
 TSAXParser.cxx:1
 TSAXParser.cxx:2
 TSAXParser.cxx:3
 TSAXParser.cxx:4
 TSAXParser.cxx:5
 TSAXParser.cxx:6
 TSAXParser.cxx:7
 TSAXParser.cxx:8
 TSAXParser.cxx:9
 TSAXParser.cxx:10
 TSAXParser.cxx:11
 TSAXParser.cxx:12
 TSAXParser.cxx:13
 TSAXParser.cxx:14
 TSAXParser.cxx:15
 TSAXParser.cxx:16
 TSAXParser.cxx:17
 TSAXParser.cxx:18
 TSAXParser.cxx:19
 TSAXParser.cxx:20
 TSAXParser.cxx:21
 TSAXParser.cxx:22
 TSAXParser.cxx:23
 TSAXParser.cxx:24
 TSAXParser.cxx:25
 TSAXParser.cxx:26
 TSAXParser.cxx:27
 TSAXParser.cxx:28
 TSAXParser.cxx:29
 TSAXParser.cxx:30
 TSAXParser.cxx:31
 TSAXParser.cxx:32
 TSAXParser.cxx:33
 TSAXParser.cxx:34
 TSAXParser.cxx:35
 TSAXParser.cxx:36
 TSAXParser.cxx:37
 TSAXParser.cxx:38
 TSAXParser.cxx:39
 TSAXParser.cxx:40
 TSAXParser.cxx:41
 TSAXParser.cxx:42
 TSAXParser.cxx:43
 TSAXParser.cxx:44
 TSAXParser.cxx:45
 TSAXParser.cxx:46
 TSAXParser.cxx:47
 TSAXParser.cxx:48
 TSAXParser.cxx:49
 TSAXParser.cxx:50
 TSAXParser.cxx:51
 TSAXParser.cxx:52
 TSAXParser.cxx:53
 TSAXParser.cxx:54
 TSAXParser.cxx:55
 TSAXParser.cxx:56
 TSAXParser.cxx:57
 TSAXParser.cxx:58
 TSAXParser.cxx:59
 TSAXParser.cxx:60
 TSAXParser.cxx:61
 TSAXParser.cxx:62
 TSAXParser.cxx:63
 TSAXParser.cxx:64
 TSAXParser.cxx:65
 TSAXParser.cxx:66
 TSAXParser.cxx:67
 TSAXParser.cxx:68
 TSAXParser.cxx:69
 TSAXParser.cxx:70
 TSAXParser.cxx:71
 TSAXParser.cxx:72
 TSAXParser.cxx:73
 TSAXParser.cxx:74
 TSAXParser.cxx:75
 TSAXParser.cxx:76
 TSAXParser.cxx:77
 TSAXParser.cxx:78
 TSAXParser.cxx:79
 TSAXParser.cxx:80
 TSAXParser.cxx:81
 TSAXParser.cxx:82
 TSAXParser.cxx:83
 TSAXParser.cxx:84
 TSAXParser.cxx:85
 TSAXParser.cxx:86
 TSAXParser.cxx:87
 TSAXParser.cxx:88
 TSAXParser.cxx:89
 TSAXParser.cxx:90
 TSAXParser.cxx:91
 TSAXParser.cxx:92
 TSAXParser.cxx:93
 TSAXParser.cxx:94
 TSAXParser.cxx:95
 TSAXParser.cxx:96
 TSAXParser.cxx:97
 TSAXParser.cxx:98
 TSAXParser.cxx:99
 TSAXParser.cxx:100
 TSAXParser.cxx:101
 TSAXParser.cxx:102
 TSAXParser.cxx:103
 TSAXParser.cxx:104
 TSAXParser.cxx:105
 TSAXParser.cxx:106
 TSAXParser.cxx:107
 TSAXParser.cxx:108
 TSAXParser.cxx:109
 TSAXParser.cxx:110
 TSAXParser.cxx:111
 TSAXParser.cxx:112
 TSAXParser.cxx:113
 TSAXParser.cxx:114
 TSAXParser.cxx:115
 TSAXParser.cxx:116
 TSAXParser.cxx:117
 TSAXParser.cxx:118
 TSAXParser.cxx:119
 TSAXParser.cxx:120
 TSAXParser.cxx:121
 TSAXParser.cxx:122
 TSAXParser.cxx:123
 TSAXParser.cxx:124
 TSAXParser.cxx:125
 TSAXParser.cxx:126
 TSAXParser.cxx:127
 TSAXParser.cxx:128
 TSAXParser.cxx:129
 TSAXParser.cxx:130
 TSAXParser.cxx:131
 TSAXParser.cxx:132
 TSAXParser.cxx:133
 TSAXParser.cxx:134
 TSAXParser.cxx:135
 TSAXParser.cxx:136
 TSAXParser.cxx:137
 TSAXParser.cxx:138
 TSAXParser.cxx:139
 TSAXParser.cxx:140
 TSAXParser.cxx:141
 TSAXParser.cxx:142
 TSAXParser.cxx:143
 TSAXParser.cxx:144
 TSAXParser.cxx:145
 TSAXParser.cxx:146
 TSAXParser.cxx:147
 TSAXParser.cxx:148
 TSAXParser.cxx:149
 TSAXParser.cxx:150
 TSAXParser.cxx:151
 TSAXParser.cxx:152
 TSAXParser.cxx:153
 TSAXParser.cxx:154
 TSAXParser.cxx:155
 TSAXParser.cxx:156
 TSAXParser.cxx:157
 TSAXParser.cxx:158
 TSAXParser.cxx:159
 TSAXParser.cxx:160
 TSAXParser.cxx:161
 TSAXParser.cxx:162
 TSAXParser.cxx:163
 TSAXParser.cxx:164
 TSAXParser.cxx:165
 TSAXParser.cxx:166
 TSAXParser.cxx:167
 TSAXParser.cxx:168
 TSAXParser.cxx:169
 TSAXParser.cxx:170
 TSAXParser.cxx:171
 TSAXParser.cxx:172
 TSAXParser.cxx:173
 TSAXParser.cxx:174
 TSAXParser.cxx:175
 TSAXParser.cxx:176
 TSAXParser.cxx:177
 TSAXParser.cxx:178
 TSAXParser.cxx:179
 TSAXParser.cxx:180
 TSAXParser.cxx:181
 TSAXParser.cxx:182
 TSAXParser.cxx:183
 TSAXParser.cxx:184
 TSAXParser.cxx:185
 TSAXParser.cxx:186
 TSAXParser.cxx:187
 TSAXParser.cxx:188
 TSAXParser.cxx:189
 TSAXParser.cxx:190
 TSAXParser.cxx:191
 TSAXParser.cxx:192
 TSAXParser.cxx:193
 TSAXParser.cxx:194
 TSAXParser.cxx:195
 TSAXParser.cxx:196
 TSAXParser.cxx:197
 TSAXParser.cxx:198
 TSAXParser.cxx:199
 TSAXParser.cxx:200
 TSAXParser.cxx:201
 TSAXParser.cxx:202
 TSAXParser.cxx:203
 TSAXParser.cxx:204
 TSAXParser.cxx:205
 TSAXParser.cxx:206
 TSAXParser.cxx:207
 TSAXParser.cxx:208
 TSAXParser.cxx:209
 TSAXParser.cxx:210
 TSAXParser.cxx:211
 TSAXParser.cxx:212
 TSAXParser.cxx:213
 TSAXParser.cxx:214
 TSAXParser.cxx:215
 TSAXParser.cxx:216
 TSAXParser.cxx:217
 TSAXParser.cxx:218
 TSAXParser.cxx:219
 TSAXParser.cxx:220
 TSAXParser.cxx:221
 TSAXParser.cxx:222
 TSAXParser.cxx:223
 TSAXParser.cxx:224
 TSAXParser.cxx:225
 TSAXParser.cxx:226
 TSAXParser.cxx:227
 TSAXParser.cxx:228
 TSAXParser.cxx:229
 TSAXParser.cxx:230
 TSAXParser.cxx:231
 TSAXParser.cxx:232
 TSAXParser.cxx:233
 TSAXParser.cxx:234
 TSAXParser.cxx:235
 TSAXParser.cxx:236
 TSAXParser.cxx:237
 TSAXParser.cxx:238
 TSAXParser.cxx:239
 TSAXParser.cxx:240
 TSAXParser.cxx:241
 TSAXParser.cxx:242
 TSAXParser.cxx:243
 TSAXParser.cxx:244
 TSAXParser.cxx:245
 TSAXParser.cxx:246
 TSAXParser.cxx:247
 TSAXParser.cxx:248
 TSAXParser.cxx:249
 TSAXParser.cxx:250
 TSAXParser.cxx:251
 TSAXParser.cxx:252
 TSAXParser.cxx:253
 TSAXParser.cxx:254
 TSAXParser.cxx:255
 TSAXParser.cxx:256
 TSAXParser.cxx:257
 TSAXParser.cxx:258
 TSAXParser.cxx:259
 TSAXParser.cxx:260
 TSAXParser.cxx:261
 TSAXParser.cxx:262
 TSAXParser.cxx:263
 TSAXParser.cxx:264
 TSAXParser.cxx:265
 TSAXParser.cxx:266
 TSAXParser.cxx:267
 TSAXParser.cxx:268
 TSAXParser.cxx:269
 TSAXParser.cxx:270
 TSAXParser.cxx:271
 TSAXParser.cxx:272
 TSAXParser.cxx:273
 TSAXParser.cxx:274
 TSAXParser.cxx:275
 TSAXParser.cxx:276
 TSAXParser.cxx:277
 TSAXParser.cxx:278
 TSAXParser.cxx:279
 TSAXParser.cxx:280
 TSAXParser.cxx:281
 TSAXParser.cxx:282
 TSAXParser.cxx:283
 TSAXParser.cxx:284
 TSAXParser.cxx:285
 TSAXParser.cxx:286
 TSAXParser.cxx:287
 TSAXParser.cxx:288
 TSAXParser.cxx:289
 TSAXParser.cxx:290
 TSAXParser.cxx:291
 TSAXParser.cxx:292
 TSAXParser.cxx:293
 TSAXParser.cxx:294
 TSAXParser.cxx:295
 TSAXParser.cxx:296
 TSAXParser.cxx:297
 TSAXParser.cxx:298
 TSAXParser.cxx:299
 TSAXParser.cxx:300
 TSAXParser.cxx:301
 TSAXParser.cxx:302
 TSAXParser.cxx:303
 TSAXParser.cxx:304
 TSAXParser.cxx:305
 TSAXParser.cxx:306
 TSAXParser.cxx:307
 TSAXParser.cxx:308
 TSAXParser.cxx:309
 TSAXParser.cxx:310
 TSAXParser.cxx:311
 TSAXParser.cxx:312
 TSAXParser.cxx:313
 TSAXParser.cxx:314
 TSAXParser.cxx:315
 TSAXParser.cxx:316
 TSAXParser.cxx:317
 TSAXParser.cxx:318
 TSAXParser.cxx:319
 TSAXParser.cxx:320
 TSAXParser.cxx:321
 TSAXParser.cxx:322
 TSAXParser.cxx:323
 TSAXParser.cxx:324
 TSAXParser.cxx:325
 TSAXParser.cxx:326
 TSAXParser.cxx:327
 TSAXParser.cxx:328
 TSAXParser.cxx:329
 TSAXParser.cxx:330
 TSAXParser.cxx:331
 TSAXParser.cxx:332
 TSAXParser.cxx:333
 TSAXParser.cxx:334
 TSAXParser.cxx:335
 TSAXParser.cxx:336
 TSAXParser.cxx:337
 TSAXParser.cxx:338
 TSAXParser.cxx:339
 TSAXParser.cxx:340
 TSAXParser.cxx:341
 TSAXParser.cxx:342
 TSAXParser.cxx:343
 TSAXParser.cxx:344
 TSAXParser.cxx:345
 TSAXParser.cxx:346
 TSAXParser.cxx:347
 TSAXParser.cxx:348
 TSAXParser.cxx:349
 TSAXParser.cxx:350
 TSAXParser.cxx:351
 TSAXParser.cxx:352
 TSAXParser.cxx:353
 TSAXParser.cxx:354
 TSAXParser.cxx:355
 TSAXParser.cxx:356
 TSAXParser.cxx:357
 TSAXParser.cxx:358
 TSAXParser.cxx:359
 TSAXParser.cxx:360
 TSAXParser.cxx:361
 TSAXParser.cxx:362
 TSAXParser.cxx:363
 TSAXParser.cxx:364
 TSAXParser.cxx:365
 TSAXParser.cxx:366
 TSAXParser.cxx:367
 TSAXParser.cxx:368
 TSAXParser.cxx:369
 TSAXParser.cxx:370
 TSAXParser.cxx:371
 TSAXParser.cxx:372
 TSAXParser.cxx:373
 TSAXParser.cxx:374
 TSAXParser.cxx:375
 TSAXParser.cxx:376
 TSAXParser.cxx:377
 TSAXParser.cxx:378
 TSAXParser.cxx:379
 TSAXParser.cxx:380
 TSAXParser.cxx:381
 TSAXParser.cxx:382
 TSAXParser.cxx:383
 TSAXParser.cxx:384
 TSAXParser.cxx:385
 TSAXParser.cxx:386
 TSAXParser.cxx:387
 TSAXParser.cxx:388
 TSAXParser.cxx:389
 TSAXParser.cxx:390
 TSAXParser.cxx:391
 TSAXParser.cxx:392
 TSAXParser.cxx:393
 TSAXParser.cxx:394
 TSAXParser.cxx:395
 TSAXParser.cxx:396
 TSAXParser.cxx:397
 TSAXParser.cxx:398
 TSAXParser.cxx:399
 TSAXParser.cxx:400
 TSAXParser.cxx:401
 TSAXParser.cxx:402
 TSAXParser.cxx:403
 TSAXParser.cxx:404
 TSAXParser.cxx:405
 TSAXParser.cxx:406
 TSAXParser.cxx:407
 TSAXParser.cxx:408
 TSAXParser.cxx:409
 TSAXParser.cxx:410
 TSAXParser.cxx:411
 TSAXParser.cxx:412
 TSAXParser.cxx:413
 TSAXParser.cxx:414
 TSAXParser.cxx:415
 TSAXParser.cxx:416
 TSAXParser.cxx:417
 TSAXParser.cxx:418
 TSAXParser.cxx:419
 TSAXParser.cxx:420
 TSAXParser.cxx:421
 TSAXParser.cxx:422
 TSAXParser.cxx:423
 TSAXParser.cxx:424
 TSAXParser.cxx:425
 TSAXParser.cxx:426
 TSAXParser.cxx:427
 TSAXParser.cxx:428
 TSAXParser.cxx:429
 TSAXParser.cxx:430
 TSAXParser.cxx:431
 TSAXParser.cxx:432
 TSAXParser.cxx:433
 TSAXParser.cxx:434
 TSAXParser.cxx:435
 TSAXParser.cxx:436
 TSAXParser.cxx:437
 TSAXParser.cxx:438
 TSAXParser.cxx:439
 TSAXParser.cxx:440
 TSAXParser.cxx:441
 TSAXParser.cxx:442
 TSAXParser.cxx:443
 TSAXParser.cxx:444
 TSAXParser.cxx:445
 TSAXParser.cxx:446
 TSAXParser.cxx:447
 TSAXParser.cxx:448
 TSAXParser.cxx:449
 TSAXParser.cxx:450
 TSAXParser.cxx:451
 TSAXParser.cxx:452
 TSAXParser.cxx:453
 TSAXParser.cxx:454
 TSAXParser.cxx:455
 TSAXParser.cxx:456
 TSAXParser.cxx:457
 TSAXParser.cxx:458
 TSAXParser.cxx:459
 TSAXParser.cxx:460
 TSAXParser.cxx:461
 TSAXParser.cxx:462
 TSAXParser.cxx:463
 TSAXParser.cxx:464
 TSAXParser.cxx:465
 TSAXParser.cxx:466
 TSAXParser.cxx:467