HANDLE	hCamera,
  U32*		pBufferSize );


Retrieves the XML file used by the camera. The XML file provides a description of the control and operation of supported cameras, using a GenICam specified markup notation.

  • hCamera is the camera handle.This value is returned by PxLInitialize.

  • pXML is a user allocated buffer that will be filled in with the XML data. All Pixelink cameras (that support XML files), use UTF-8 (ASCII Encoding) for their XML files.

  • pBufferSize is the size of buffer allocated for the XML data (in bytes). If this value is less than the size of the XML data, then the data is not copied to pXML. Rather, pBufferSize is updated to reflect the size of the XML data.



 // Grab the XML from the camera
 string xmlFile;
 U32    xmlFileSize = 0;
 // Determine the size of the XML file
 rc = PxLGetCameraXML (hCamera, NULL, &xmlFileSize);
 if (API_SUCCESS(rc)) {
     xmlFile.resize (xmlFileSize);
     // Now 'get' the actual XML file
     rc = PxLGetCameraXML (hCamera, (LPVOID)xmlFile.c_str(), &xmlFileSize);
     if (API_SUCCESS(rc)) {
         printf ("======== Camera's XML file (%d bytes) ========\n", xmlFileSize);
         printf ("%s", xmlFile.c_str());

Comments, Restrictions and Limitations

Only Pixelink cameras that support the USB(3) Vision, and GigE Vision standards, contain XML files. That is, USB3, GigE and 10 GigE cameras. Calling this function with an hCamera for any other camera type, will result in the function returning ApiNotSupportedError. Some cameras may store the XML file in a compressed format to economize on camera resources. For these cameras, this function will decompress the XML data, so that the returned data is a human-readable format (UTF-8/ASCII).