<div dir="ltr">Hello, reading the raster VRT tutorial<div><br></div><div><a href="https://gdal.org/drivers/raster/vrt.html#creation-of-vrt-datasets">https://gdal.org/drivers/raster/vrt.html#creation-of-vrt-datasets</a><br></div><div><br></div><div>with this code: </div><div><br></div><div>//</div><div>int   nBand;<br>GDALDriver *poDriver = (GDALDriver *) GDALGetDriverByName( "VRT" );<br>GDALDataset *poSrcDS, *poVRTDS;<br>poSrcDS = (GDALDataset *) GDALOpenShared( pszSourceFilename, GA_ReadOnly );<br>poVRTDS = poDriver->CreateCopy( "", poSrcDS, FALSE, NULL, NULL, NULL );<br><div>//</div><div><br></div><div>Is there a way to obtained the VRT XML text representing poVRTDS without writing to an actual file? </div><div><br></div><div>Sorry if this is obvious, haven't been able to find an example that does what I want. I've seen examples using GetMetadataItem from a band for parts of the XML, but can't see how to get the entire thing. </div><div><br></div><div>Thanks for your help. </div><div><br></div><div>Best, Mike</div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Michael Sumner<br>Software and Database Engineer<br>Australian Antarctic Division<br>Hobart, Australia<br>e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a></div></div></div>