version 1.56, 2002/05/30 21:45:18
|
version 1.57, 2002/05/31 04:02:09
|
|
|
| |
Boolean XmlReader::getValueObjectWithPathElement( | Boolean XmlReader::getValueObjectWithPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMObjectWithPath& objectWithPath) |
CIMObject& objectWithPath) |
{ | { |
XmlEntry entry; | XmlEntry entry; |
| |
|
|
throw XmlValidationError(parser.getLine(), | throw XmlValidationError(parser.getLine(), |
"Expected INSTANCE element"); | "Expected INSTANCE element"); |
} | } |
objectWithPath.set(reference, CIMObject(cimInstance)); |
objectWithPath = CIMObject (cimInstance); |
|
objectWithPath.setPath (reference); |
} | } |
else | else |
{ | { |
|
|
throw XmlValidationError(parser.getLine(), | throw XmlValidationError(parser.getLine(), |
"Expected CLASS element"); | "Expected CLASS element"); |
} | } |
objectWithPath.set(reference, CIMObject(cimClass)); |
objectWithPath = CIMObject (cimClass); |
|
objectWithPath.setPath (reference); |
} | } |
| |
expectEndTag(parser, "VALUE.OBJECTWITHPATH"); | expectEndTag(parser, "VALUE.OBJECTWITHPATH"); |
|
|
| |
Boolean XmlReader::getValueObjectWithLocalPathElement( | Boolean XmlReader::getValueObjectWithLocalPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMObjectWithPath& objectWithPath) |
CIMObject& objectWithPath) |
{ | { |
XmlEntry entry; | XmlEntry entry; |
| |
|
|
throw XmlValidationError(parser.getLine(), | throw XmlValidationError(parser.getLine(), |
"Expected INSTANCE element"); | "Expected INSTANCE element"); |
} | } |
objectWithPath.set(reference, CIMObject(cimInstance)); |
objectWithPath = CIMObject (cimInstance); |
|
objectWithPath.setPath (reference); |
} | } |
else | else |
{ | { |
|
|
throw XmlValidationError(parser.getLine(), | throw XmlValidationError(parser.getLine(), |
"Expected CLASS element"); | "Expected CLASS element"); |
} | } |
objectWithPath.set(reference, CIMObject(cimClass)); |
objectWithPath = CIMObject (cimClass); |
|
objectWithPath.setPath (reference); |
} | } |
| |
expectEndTag(parser, "VALUE.OBJECTWITHLOCALPATH"); | expectEndTag(parser, "VALUE.OBJECTWITHLOCALPATH"); |
|
|
| |
void XmlReader::getObjectArray( | void XmlReader::getObjectArray( |
XmlParser& parser, | XmlParser& parser, |
Array<CIMObjectWithPath>& objectArray) |
Array<CIMObject>& objectArray) |
{ | { |
CIMObject object; | CIMObject object; |
CIMObjectWithPath objectWithPath; |
CIMObject objectWithPath; |
| |
objectArray.clear(); | objectArray.clear(); |
| |
if (getValueObjectElement(parser, object)) | if (getValueObjectElement(parser, object)) |
{ | { |
objectArray.append(CIMObjectWithPath(CIMObjectPath(), object)); |
objectArray.append(object); |
while (getValueObjectElement(parser, object)) | while (getValueObjectElement(parser, object)) |
objectArray.append(CIMObjectWithPath(CIMObjectPath(), object)); |
objectArray.append(object); |
} | } |
else if (getValueObjectWithPathElement(parser, objectWithPath)) | else if (getValueObjectWithPathElement(parser, objectWithPath)) |
{ | { |