(file) Return to XmlParser.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlParser.cpp between version 1.1.1.1 and 1.2

version 1.1.1.1, 2001/01/14 19:53:23 version 1.2, 2001/03/23 21:33:44
Line 23 
Line 23 
 // Author: // Author:
 // //
 // $Log$ // $Log$
   // Revision 1.2  2001/03/23 21:33:44  mike
   // Removed debugging output
   //
 // Revision 1.1.1.1  2001/01/14 19:53:23  mike // Revision 1.1.1.1  2001/01/14 19:53:23  mike
 // Pegasus import // Pegasus import
 // //
Line 393 
Line 396 
 Boolean XmlParser::_getElementName(char*& p) Boolean XmlParser::_getElementName(char*& p)
 { {
     if (!isalpha(*p) && *p != '_')     if (!isalpha(*p) && *p != '_')
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_START_TAG, _line);         throw XmlException(XmlException::BAD_START_TAG, _line);
     }  
  
     while (*p &&     while (*p &&
         (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))         (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))
Line 424 
Line 424 
     openCloseElement = false;     openCloseElement = false;
  
     if (!isalpha(*p) && *p != '_')     if (!isalpha(*p) && *p != '_')
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_START_TAG, _line);         throw XmlException(XmlException::BAD_START_TAG, _line);
     }  
  
     while (*p &&     while (*p &&
         (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))         (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))
Line 461 
Line 458 
 void XmlParser::_getAttributeNameAndEqual(char*& p) void XmlParser::_getAttributeNameAndEqual(char*& p)
 { {
     if (!isalpha(*p) && *p != '_')     if (!isalpha(*p) && *p != '_')
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line);         throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line);
     }  
  
     while (*p &&     while (*p &&
         (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))         (isalnum(*p) || *p == '_' || *p == '-' || *p == ':' || *p == '.'))
Line 475 
Line 469 
     _skipWhitespace(p);     _skipWhitespace(p);
  
     if (*p != '=')     if (*p != '=')
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line);         throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line);
     }  
  
     p++;     p++;
  
Line 492 
Line 483 
     // ATTN-B: handle values contained in semiquotes:     // ATTN-B: handle values contained in semiquotes:
  
     if (*p != '"' && *p != '\'')     if (*p != '"' && *p != '\'')
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);         throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);
     }  
  
     char startChar = *p++;     char startChar = *p++;
  
Line 503 
Line 491 
         p++;         p++;
  
     if (*p != startChar)     if (*p != startChar)
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);         throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);
     }  
  
     *p++ = '\0';     *p++ = '\0';
 } }
Line 705 
Line 690 
         entry.text = ++p;         entry.text = ++p;
  
         if (!_getElementName(p))         if (!_getElementName(p))
         {  
             std::cout << __LINE__ << std::endl;  
             throw(XmlException(XmlException::BAD_END_TAG, _line));             throw(XmlException(XmlException::BAD_END_TAG, _line));
         }  
  
         return;         return;
     }     }
Line 727 
Line 709 
         }         }
     }     }
     else     else
     {  
         std::cout << __LINE__ << std::endl;  
         throw XmlException(XmlException::BAD_START_TAG, _line);         throw XmlException(XmlException::BAD_START_TAG, _line);
     }  
  
     //--------------------------------------------------------------------------     //--------------------------------------------------------------------------
     // Grab all the attributes:     // Grab all the attributes:
Line 763 
Line 742 
         _getAttributeNameAndEqual(p);         _getAttributeNameAndEqual(p);
  
         if (*p != '"' && *p != '\'')         if (*p != '"' && *p != '\'')
         {  
             std::cout << __LINE__ << std::endl;  
             throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);             throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);
         }  
  
         attr.value = p + 1;         attr.value = p + 1;
         _getAttributeValue(p);         _getAttributeValue(p);
Line 777 
Line 753 
  
             if (!(p[0] == '?' && p[1] == '>') && !isspace(*p))             if (!(p[0] == '?' && p[1] == '>') && !isspace(*p))
             {             {
                 std::cout << __LINE__ << std::endl;  
                 throw XmlException(                 throw XmlException(
                     XmlException::BAD_ATTRIBUTE_VALUE, _line);                     XmlException::BAD_ATTRIBUTE_VALUE, _line);
             }             }
Line 786 
Line 761 
         {         {
             // The next thing must be a space or a '>':             // The next thing must be a space or a '>':
  
             std::cout << __LINE__ << std::endl;  
             throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);             throw XmlException(XmlException::BAD_ATTRIBUTE_VALUE, _line);
         }         }
  


Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2