ICatalogManager3::ValidateXML Method [C++]
Use this method to validate an XML-formatted file without actually importing it into the Product Catalog System.
Definition
[C++]
HRESULT ICatalogManager3::ValidateXML(BSTRstrXMLFilePath _Recordset** ppRsErrors);
[Visual Basic]
Function ValidateXML(strXMLFilePath As String,) As Recordset
Parameters
- strXMLFilePath[C++]
[in] A BSTR that contains the path of the XML file. - strXMLFilePath[Visual Basic]
A String that contains the path of the XML file. - ppRsErrors [C++]
[out retval] The address of a pointer to a _Recordset that contains, on output, the first 100 errors found.
Return Values
[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
[Visual Basic] None.
Error Values
The following table describes the custom COM errors this method can return.
Name | Value | Description |
---|---|---|
E_CAT_CATMGR_NOT_INITIALIZED | [C++] 0x889800B [Visual Basic] &H8898005 |
The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method. |
E_CAT_INVALID_RS_POINTER | [C++] 0x889800B [Visual Basic] &H8898007 |
The recordset pointer that you specified is invalid. |
Remarks
[C++]
If the XML file is valid this method will return S_OK and the ppRsErrors parameter returned by this method will be NULL. If the file contains errors, the method returns S_FALSE. The ppRsErrors parameter returned by this method contains valid error data only if the method completes successfully with a value of S_FALSE and there are errors to report.
The recordset returned by the ppRsErrors parameter has a single field, Errors, and one row for each error. This method will return a maximum of 100 errors.
[Visual Basic]
If the XML file is valid this method sets the Number property of the global Err object to S_OK, and the ppRsErrors parameter returned by this method will contain Nothing. If the method sets that value to S_FALSE the file contains errors. The returned Recordset contains valid error data only if the method completes successfully with a value of S_FALSE and there are errors to report.
The returned Recordset has a single field, Errors, and one row for each error. This method will return a maximum of 100 errors.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
[Visual Basic]
Example
Set RsErrors = oCatalogManager.ValidateXML ("C:\SampleFile.xml")
See Also
[Visual Basic]CatalogManager Object
Copyright © 2005 Microsoft Corporation.
All rights reserved.