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

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.35 and 1.53

version 1.35, 2002/03/07 00:42:12 version 1.53, 2002/05/13 18:35:53
Line 29 
Line 29 
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
   #include <Pegasus/Common/Config.h>
 #include <cassert> #include <cassert>
 #include <cctype> #include <cctype>
 #include <cstdio> #include <cstdio>
 #include <cstdlib> #include <cstdlib>
   #if defined(PEGASUS_OS_TYPE_UNIX)
   #include <errno.h>
   #endif
 #include "CIMName.h" #include "CIMName.h"
 #include "XmlReader.h" #include "XmlReader.h"
 #include "XmlWriter.h" #include "XmlWriter.h"
Line 52 
Line 55 
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 // //
 // expectXmlDeclaration()  // getXmlDeclaration()
   //
   //     <?xml version="1.0" encoding="utf-8"?>
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 void XmlReader::expectXmlDeclaration(  void XmlReader::getXmlDeclaration(
     XmlParser& parser,     XmlParser& parser,
     XmlEntry& entry)      const char*& xmlVersion,
       const char*& xmlEncoding)
 { {
       XmlEntry entry;
   
     if (!parser.next(entry) ||     if (!parser.next(entry) ||
         entry.type != XmlEntry::XML_DECLARATION ||         entry.type != XmlEntry::XML_DECLARATION ||
         strcmp(entry.text, "xml") != 0)         strcmp(entry.text, "xml") != 0)
Line 67 
Line 75 
         throw XmlValidationError(parser.getLine(),         throw XmlValidationError(parser.getLine(),
             "Expected <?xml ... ?> style declaration");             "Expected <?xml ... ?> style declaration");
     }     }
   
       if (!entry.getAttributeValue("version", xmlVersion))
           throw XmlValidationError(
               parser.getLine(), "missing xml.version attribute");
   
       if (!entry.getAttributeValue("encoding", xmlEncoding))
       {
           // ATTN-RK-P3-20020403:  Is there a default encoding?
       }
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 200 
Line 217 
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 // //
 // testEndTag>()  // testEndTag()
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
Line 584 
Line 601 
  
 Boolean XmlReader::stringToReal(const char* stringValue, Real64& x) Boolean XmlReader::stringToReal(const char* stringValue, Real64& x)
 { {
       //
       // Check the string against the DMTF-defined grammar
       //
     const char* p = stringValue;     const char* p = stringValue;
  
     if (!*p)     if (!*p)
Line 640 
Line 660 
     if (*p)     if (*p)
         return false;         return false;
  
       //
       // Do the conversion
       //
     char* end;     char* end;
       errno = 0;
     x = strtod(stringValue, &end);     x = strtod(stringValue, &end);
       if (*end || (errno == ERANGE))
       {
           return false;
       }
   
     return true;     return true;
 } }
  
   inline Uint8 _hexCharToNumeric(const char c)
   {
       Uint8 n;
   
       if (isdigit(c))
           n = (c - '0');
       else if (isupper(c))
           n = (c - 'A' + 10);
       else // if (islower(c))
           n = (c - 'a' + 10);
   
       return n;
   }
   
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 // //
 // stringToSignedInteger // stringToSignedInteger
 // //
 //      [ "+" | "-" ] ( positiveDecimalDigit *decimalDigit | "0" ) //      [ "+" | "-" ] ( positiveDecimalDigit *decimalDigit | "0" )
   //    or
   //      [ "+" | "-" ] ( "0x" | "0X" ) 1*hexDigit
 // //
 // ATTN-B: handle conversion from hexadecimal.  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 Boolean XmlReader::stringToSignedInteger( Boolean XmlReader::stringToSignedInteger(
Line 661 
Line 705 
     x = 0;     x = 0;
     const char* p = stringValue;     const char* p = stringValue;
  
     if (!*p)      if (!p || !*p)
         return false;         return false;
  
     // Skip optional sign:     // Skip optional sign:
Line 671 
Line 715 
     if (negative || *p == '+')     if (negative || *p == '+')
         p++;         p++;
  
     // If the next thing is a zero, then it must be the last:  
   
     if (*p == '0')     if (*p == '0')
         return p[1] == '\0';      {
           if ( (p[1] == 'x') || (p[1] == 'X') )
     // Expect a positive decimal digit:          {
               // Convert a hexadecimal string
  
     const char* first = p;              // Skip over the "0x"
               p+=2;
  
     if (!isdigit(*p) || *p == '0')              // At least one hexadecimal digit is required
               if (!isxdigit(*p))
         return false;         return false;
  
     p++;              // Build the Sint64 as a negative number, regardless of the
               // eventual sign (negative numbers can be bigger than positive ones)
  
     // Expect zero or more digits:              // Add on each digit, checking for overflow errors
               while (isxdigit(*p))
               {
                   // Make sure we won't overflow when we multiply by 16
                   if (x < PEGASUS_LLONG_MIN/16)
                   {
                       return false;
                   }
                   x = x << 4;
  
     while (isdigit(*p))                  // Make sure we don't overflow when we add the next digit
         p++;                  Sint64 newDigit = Sint64(_hexCharToNumeric(*p++));
                   if (PEGASUS_LLONG_MIN - x > -newDigit)
                   {
                       return false;
                   }
                   x = x - newDigit;
               }
  
               // If we found a non-hexadecimal digit, report an error
     if (*p)     if (*p)
         return false;         return false;
  
     const char* last = p;              // Return the integer to positive, if necessary, checking for an
               // overflow error
               if (!negative)
               {
                   if (x == PEGASUS_LLONG_MIN)
                   {
                       return false;
                   }
                   x = -x;
               }
               return true;
           }
           else
           {
               // A decimal string that starts with '0' must be exactly "0".
               return p[1] == '\0';
           }
       }
   
       // Expect a positive decimal digit:
   
       // At least one decimal digit is required
       if (!isdigit(*p))
           return false;
   
       // Build the Sint64 as a negative number, regardless of the
       // eventual sign (negative numbers can be bigger than positive ones)
  
     while (first != last)      // Add on each digit, checking for overflow errors
         x = 10 * x + (*first++ - '0');      while (isdigit(*p))
       {
           // Make sure we won't overflow when we multiply by 10
           if (x < PEGASUS_LLONG_MIN/10)
           {
               return false;
           }
           x = 10 * x;
  
     if (negative)          // Make sure we won't overflow when we add the next digit
         x = -x;          Sint64 newDigit = (*p++ - '0');
           if (PEGASUS_LLONG_MIN - x > -newDigit)
           {
               return false;
           }
           x = x - newDigit;
       }
  
       // If we found a non-decimal digit, report an error
       if (*p)
           return false;
   
       // Return the integer to positive, if necessary, checking for an
       // overflow error
       if (!negative)
       {
           if (x == PEGASUS_LLONG_MIN)
           {
               return false;
           }
           x = -x;
       }
     return true;     return true;
 } }
  
Line 708 
Line 822 
 // //
 // stringToUnsignedInteger // stringToUnsignedInteger
 // //
 //      [ "+" | "-" ] ( positiveDecimalDigit *decimalDigit | "0" )  //      ( positiveDecimalDigit *decimalDigit | "0" )
   //    or
   //      ( "0x" | "0X" ) 1*hexDigit
 // //
 // ATTN-B: handle conversion from hexadecimal.  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 Boolean XmlReader::stringToUnsignedInteger( Boolean XmlReader::stringToUnsignedInteger(
Line 720 
Line 835 
     x = 0;     x = 0;
     const char* p = stringValue;     const char* p = stringValue;
  
     if (!*p)      if (!p || !*p)
         return false;         return false;
  
     // Skip optional sign:      if (*p == '0')
       {
           if ( (p[1] == 'x') || (p[1] == 'X') )
           {
               // Convert a hexadecimal string
   
               // Skip over the "0x"
               p+=2;
  
     if (*p == '-')              // At least one hexadecimal digit is required
               if (!*p)
         return false;         return false;
  
     if (*p == '+')              // Add on each digit, checking for overflow errors
         p++;              while (isxdigit(*p))
               {
                   // Make sure we won't overflow when we multiply by 16
                   if (x > PEGASUS_ULLONG_MAX/16)
                   {
                       return false;
                   }
                   x = x << 4;
  
     // If the next thing is a zero, then it must be the last:                  // We can't overflow when we add the next digit
                   Uint64 newDigit = Uint64(_hexCharToNumeric(*p++));
                   if (PEGASUS_ULLONG_MAX - x < newDigit)
                   {
                       return false;
                   }
                   x = x + newDigit;
               }
  
     if (*p == '0')              // If we found a non-hexadecimal digit, report an error
               if (*p)
                   return false;
   
               return true;
           }
           else
           {
               // A decimal string that starts with '0' must be exactly "0".
         return p[1] == '\0';         return p[1] == '\0';
           }
       }
  
     // Expect a positive decimal digit:     // Expect a positive decimal digit:
  
     const char* first = p;      // Add on each digit, checking for overflow errors
       while (isdigit(*p))
     if (!isdigit(*p) || *p == '0')      {
           // Make sure we won't overflow when we multiply by 10
           if (x > PEGASUS_ULLONG_MAX/10)
           {
         return false;         return false;
           }
           x = 10 * x;
  
     p++;          // Make sure we won't overflow when we add the next digit
           Uint64 newDigit = (*p++ - '0');
     // Expect zero or more digits:          if (PEGASUS_ULLONG_MAX - x < newDigit)
           {
     while (isdigit(*p))              return false;
         p++;          }
           x = x + newDigit;
       }
  
       // If we found a non-decimal digit, report an error
     if (*p)     if (*p)
         return false;         return false;
  
     const char* last = p;  
   
     while (first != last)  
         x = 10 * x + (*first++ - '0');  
   
     return true;     return true;
 } }
  
Line 765 
Line 915 
 // //
 // stringToValue() // stringToValue()
 // //
 // ATTN-C: note that integers are truncated without warning. What should be  
 // done in this case? In C they are truncated without warning by design.  
 //  
 // Return: CIMValue. If the string input is zero length creates a CIMValue // Return: CIMValue. If the string input is zero length creates a CIMValue
 //         with value defined by the type.  Else the value is inserted. //         with value defined by the type.  Else the value is inserted.
 // //
Line 782 
Line 929 
 { {
     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):
  
     // If strlen == 0, set to default value for type  
   
     if (strlen(valueString)==0)  
     {  
         switch (type)  
         {  
             case CIMType::BOOLEAN: return CIMValue(false);  
             case CIMType::STRING: return CIMValue(valueString);  
             case CIMType::CHAR16: return CIMValue(Char16('\0'));  
             case CIMType::UINT8: return CIMValue(Uint8(0));  
             case CIMType::UINT16: return CIMValue(Uint16(0));  
             case CIMType::UINT32: return CIMValue(Uint32(0));  
             case CIMType::UINT64: return CIMValue(Uint64(0));  
             case CIMType::SINT8: return CIMValue(Sint8(0));  
             case CIMType::SINT16: return CIMValue(Sint16(0));  
             case CIMType::SINT32: return CIMValue(Sint32(0));  
             case CIMType::SINT64: return CIMValue(Sint64(0));  
             case CIMType::REAL32: return CIMValue(Real32(0));  
             case CIMType::REAL64: return CIMValue(Real64(0));  
         }  
     }  
   
     // Create value per type     // Create value per type
     switch (type)     switch (type)
     {     {
Line 846 
Line 971 
  
             switch (type)             switch (type)
             {             {
                 case CIMType::UINT8: return CIMValue(Uint8(x));                  case CIMType::UINT8:
                 case CIMType::UINT16: return CIMValue(Uint16(x));                  {
                 case CIMType::UINT32: return CIMValue(Uint32(x));                      if (x >= (Uint64(1)<<8))
                       {
                           throw XmlSemanticError(
                               lineNumber, "Uint8 value out of range");
                       }
                       return CIMValue(Uint8(x));
                   }
                   case CIMType::UINT16:
                   {
                       if (x >= (Uint64(1)<<16))
                       {
                           throw XmlSemanticError(
                               lineNumber, "Uint16 value out of range");
                       }
                       return CIMValue(Uint16(x));
                   }
                   case CIMType::UINT32:
                   {
                       if (x >= (Uint64(1)<<32))
                       {
                           throw XmlSemanticError(
                               lineNumber, "Uint32 value out of range");
                       }
                       return CIMValue(Uint32(x));
                   }
                 case CIMType::UINT64: return CIMValue(Uint64(x));                 case CIMType::UINT64: return CIMValue(Uint64(x));
                 default: break;                 default: break;
             }             }
Line 869 
Line 1018 
  
             switch (type)             switch (type)
             {             {
                 case CIMType::SINT8: return CIMValue(Sint8(x));                  case CIMType::SINT8:
                 case CIMType::SINT16: return CIMValue(Sint16(x));                  {
                 case CIMType::SINT32: return CIMValue(Sint32(x));                      if(  (x >= (Sint64(1)<<7)) || (x < (-(Sint64(1)<<7))) )
                       {
                           throw XmlSemanticError(
                               lineNumber, "Sint8 value out of range");
                       }
                       return CIMValue(Sint8(x));
                   }
                   case CIMType::SINT16:
                   {
                       if(  (x >= (Sint64(1)<<15)) || (x < (-(Sint64(1)<<15))) )
                       {
                           throw XmlSemanticError(
                               lineNumber, "Sint16 value out of range");
                       }
                       return CIMValue(Sint16(x));
                   }
                   case CIMType::SINT32:
                   {
                       if(  (x >= (Sint64(1)<<31)) || (x < (-(Sint64(1)<<31))) )
                       {
                           throw XmlSemanticError(
                               lineNumber, "Sint32 value out of range");
                       }
                       return CIMValue(Sint32(x));
                   }
                 case CIMType::SINT64: return CIMValue(Sint64(x));                 case CIMType::SINT64: return CIMValue(Sint64(x));
                 default: break;                 default: break;
             }             }
Line 898 
Line 1071 
             Real64 x;             Real64 x;
  
             if (!stringToReal(valueString, x))             if (!stringToReal(valueString, x))
                 throw XmlSemanticError(lineNumber, "Bad real value");                  throw XmlSemanticError(lineNumber, "Bad real number value");
  
             return CIMValue(Real32(x));             return CIMValue(Real32(x));
         }         }
Line 908 
Line 1081 
             Real64 x;             Real64 x;
  
             if (!stringToReal(valueString, x))             if (!stringToReal(valueString, x))
                 throw XmlSemanticError(lineNumber, "Bad real value");                  throw XmlSemanticError(lineNumber, "Bad real number value");
  
             return CIMValue(x);             return CIMValue(x);
         }         }
Line 1165 
Line 1338 
     if (!testStartTagOrEmptyTag(parser, entry, "VALUE.ARRAY"))     if (!testStartTagOrEmptyTag(parser, entry, "VALUE.ARRAY"))
         return false;         return false;
  
     //ATTN: P1 KS KSTESTNULL - Need to relook at this one.  
     if (entry.type == XmlEntry::EMPTY_TAG)  
         return true;  
   
     if (entry.type != XmlEntry::EMPTY_TAG)     if (entry.type != XmlEntry::EMPTY_TAG)
     {     {
         // For each VALUE element:         // For each VALUE element:
Line 1233 
Line 1402 
     Boolean translatable = getCimBooleanAttribute(     Boolean translatable = getCimBooleanAttribute(
         lineNumber, entry, tagName, "TRANSLATABLE", false, false);         lineNumber, entry, tagName, "TRANSLATABLE", false, false);
  
     // ATTN: KS P1 5 Mar 2002 Should this not be CIMFlavor::DEFAULTS??      // Start with CIMFlavor::NONE.  Defaults are specified in the
     Uint32 flavor = CIMFlavor::DEFAULTS;      // getCimBooleanAttribute() calls above.
       Uint32 flavor = CIMFlavor::NONE;
  
     if (overridable)     if (overridable)
         flavor |= CIMFlavor::OVERRIDABLE;         flavor |= CIMFlavor::OVERRIDABLE;
           else
                   flavor |= CIMFlavor::DISABLEOVERRIDE;
  
     if (toSubClass)     if (toSubClass)
         flavor |= CIMFlavor::TOSUBCLASS;         flavor |= CIMFlavor::TOSUBCLASS;
           else
                   flavor |= CIMFlavor::RESTRICTED;
  
     if (toInstance)     if (toInstance)
         flavor |= CIMFlavor::TOINSTANCE;         flavor |= CIMFlavor::TOINSTANCE;
Line 1321 
Line 1495 
 // //
 // getQualifierElement() // getQualifierElement()
 // //
 //     <!ELEMENT QUALIFIER (VALUE|VALUE.ARRAY)>  //     <!ELEMENT QUALIFIER (VALUE|VALUE.ARRAY)?>
 //     <!ATTLIST QUALIFIER //     <!ATTLIST QUALIFIER
 //         %CIMName; //         %CIMName;
 //         %CIMType; #REQUIRED //         %CIMType; #REQUIRED
Line 1359 
Line 1533 
  
     // Get VALUE or VALUE.ARRAY element:     // Get VALUE or VALUE.ARRAY element:
  
     // ATTN: KS P1 4 March 2002 - Requires either value or array element or  
     // generates exception.  Correct for spec but means no NULL values on qualifier  
     // values. Alternative is to set NULL value and continue  
   
     CIMValue value;     CIMValue value;
  
     if (!getValueElement(parser, type, value) &&     if (!getValueElement(parser, type, value) &&
         !getValueArrayElement(parser, type, value))         !getValueArrayElement(parser, type, value))
     {     {
         throw XmlSemanticError(parser.getLine(),          value.setNullValue(type, false);
             "Expected VALUE or VALUE.ARRAY element");  
     }     }
  
     // Expect </QUALIFIER>:     // Expect </QUALIFIER>:
Line 2278 
Line 2447 
  
     // Create property:     // Create property:
  
     CIMValue value;      CIMValue value = CIMValue(CIMType::REFERENCE, false, 0);
     value.set(CIMReference());  //    value.set(CIMReference());
     property = CIMProperty(     property = CIMProperty(
         name, value, 0, referenceClass, classOrigin, propagated);         name, value, 0, referenceClass, classOrigin, propagated);
  
Line 3028 
Line 3197 
  
 Boolean XmlReader::getErrorElement( Boolean XmlReader::getErrorElement(
     XmlParser& parser,     XmlParser& parser,
     CIMStatusCode& code,      CIMException& cimException,
     const char*& description,  
     Boolean required)     Boolean required)
 { {
     XmlEntry entry;     XmlEntry entry;
Line 3051 
Line 3219 
         throw XmlValidationError(         throw XmlValidationError(
             parser.getLine(), "missing ERROR.CODE attribute");             parser.getLine(), "missing ERROR.CODE attribute");
  
     code = CIMStatusCode(tmpCode);  
   
     // Get ERROR.DESCRIPTION:     // Get ERROR.DESCRIPTION:
  
     description = "";      String tmpDescription;
     entry.getAttributeValue("DESCRIPTION", description);  
       entry.getAttributeValue("DESCRIPTION", tmpDescription);
  
     if (!empty)     if (!empty)
         expectEndTag(parser, "ERROR");         expectEndTag(parser, "ERROR");
  
       cimException = PEGASUS_CIM_EXCEPTION(CIMStatusCode(tmpCode), tmpDescription);
     return true;     return true;
 } }
  
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 // getObjectWithPath()  // getValueObjectElement()
   //
   // <!ELEMENT VALUE.OBJECT (CLASS|INSTANCE)>
   //
   //------------------------------------------------------------------------------
   
   Boolean XmlReader::getValueObjectElement(
       XmlParser& parser,
       CIMObject& object)
   {
       XmlEntry entry;
   
       if (!testStartTag(parser, entry, "VALUE.OBJECT"))
           return false;
   
       CIMInstance cimInstance;
       CIMClass cimClass;
   
       if (XmlReader::getInstanceElement(parser, cimInstance))
       {
           object = CIMObject(cimInstance);
       }
       else if (!XmlReader::getClassElement(parser, cimClass))
       {
           object = CIMObject(cimClass);
       }
       else
       {
           throw XmlValidationError(parser.getLine(),
               "Expected INSTANCE or CLASS element");
       }
   
       expectEndTag(parser, "VALUE.OBJECT");
   
       return true;
   }
   
   //------------------------------------------------------------------------------
   // getValueObjectWithPathElement()
 // //
 // <!ELEMENT VALUE.OBJECTWITHPATH ((CLASSPATH,CLASS)|(INSTANCEPATH,INSTANCE))> // <!ELEMENT VALUE.OBJECTWITHPATH ((CLASSPATH,CLASS)|(INSTANCEPATH,INSTANCE))>
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 Boolean XmlReader::getObjectWithPath(  Boolean XmlReader::getValueObjectWithPathElement(
     XmlParser& parser,     XmlParser& parser,
     CIMObjectWithPath& objectWithPath)     CIMObjectWithPath& objectWithPath)
 { {
Line 3089 
Line 3295 
     else if (!XmlReader::getClassPathElement(parser, reference))     else if (!XmlReader::getClassPathElement(parser, reference))
     {     {
         throw XmlValidationError(parser.getLine(),         throw XmlValidationError(parser.getLine(),
             "Expected INSTANCE element");              "Expected INSTANCEPATH or CLASSPATH element");
     }     }
  
     if (isInstance)     if (isInstance)
Line 3099 
Line 3305 
         if (!XmlReader::getInstanceElement(parser, cimInstance))         if (!XmlReader::getInstanceElement(parser, cimInstance))
         {         {
             throw XmlValidationError(parser.getLine(),             throw XmlValidationError(parser.getLine(),
                 "Expected INSTANCEPATH or CLASSPATH element");                  "Expected INSTANCE element");
         }         }
         objectWithPath.set(reference, CIMObject(cimInstance));         objectWithPath.set(reference, CIMObject(cimInstance));
     }     }
Line 3121 
Line 3327 
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
   // getValueObjectWithLocalPathElement()
   //
   // <!ELEMENT VALUE.OBJECTWITHLOCALPATH
   //     ((LOCALCLASSPATH,CLASS)|(LOCALINSTANCEPATH,INSTANCE))>
   //
   //------------------------------------------------------------------------------
   
   Boolean XmlReader::getValueObjectWithLocalPathElement(
       XmlParser& parser,
       CIMObjectWithPath& objectWithPath)
   {
       XmlEntry entry;
   
       if (!testStartTag(parser, entry, "VALUE.OBJECTWITHLOCALPATH"))
           return false;
   
       CIMReference reference;
       Boolean isInstance = false;
   
       if (XmlReader::getLocalInstancePathElement(parser, reference))
           isInstance = true;
       else if (!XmlReader::getLocalClassPathElement(parser, reference))
       {
           throw XmlValidationError(parser.getLine(),
               "Expected LOCALINSTANCEPATH or LOCALCLASSPATH element");
       }
   
       if (isInstance)
       {
           CIMInstance cimInstance;
   
           if (!XmlReader::getInstanceElement(parser, cimInstance))
           {
               throw XmlValidationError(parser.getLine(),
                   "Expected INSTANCE element");
           }
           objectWithPath.set(reference, CIMObject(cimInstance));
       }
       else
       {
           CIMClass cimClass;
   
           if (!XmlReader::getClassElement(parser, cimClass))
           {
               throw XmlValidationError(parser.getLine(),
                   "Expected CLASS element");
           }
           objectWithPath.set(reference, CIMObject(cimClass));
       }
   
       expectEndTag(parser, "VALUE.OBJECTWITHLOCALPATH");
   
       return true;
   }
   
   //------------------------------------------------------------------------------
   // getObjectArray()
   //
   // <object>
   //     (VALUE.OBJECT|VALUE.OBJECTWITHLOCALPATH|VALUE.OBJECTWITHPATH)
   //
   //------------------------------------------------------------------------------
   
   void XmlReader::getObjectArray(
       XmlParser& parser,
       Array<CIMObjectWithPath>& objectArray)
   {
       CIMObject object;
       CIMObjectWithPath objectWithPath;
   
       objectArray.clear();
   
       if (getValueObjectElement(parser, object))
       {
           objectArray.append(CIMObjectWithPath(CIMReference(), object));
           while (getValueObjectElement(parser, object))
               objectArray.append(CIMObjectWithPath(CIMReference(), object));
       }
       else if (getValueObjectWithPathElement(parser, objectWithPath))
       {
           objectArray.append(objectWithPath);
           while (getValueObjectWithPathElement(parser, objectWithPath))
               objectArray.append(objectWithPath);
       }
       else if (getValueObjectWithLocalPathElement(parser, objectWithPath))
       {
           objectArray.append(objectWithPath);
           while (getValueObjectWithLocalPathElement(parser, objectWithPath))
               objectArray.append(objectWithPath);
       }
   }
   
   //------------------------------------------------------------------------------
 // //
 // <objectName>: (CLASSNAME|INSTANCENAME) // <objectName>: (CLASSNAME|INSTANCENAME)
 // //


Legend:
Removed from v.1.35  
changed lines
  Added in v.1.53

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2