Omit schema from XML returned with QlmLicense.DownloadProducts
When making a call to QLMLicense.DownloadProducts, the dataset that is returned contains the schema.
I'm converting the XML to JSON for easier handling so the schema botches up the conversion. Is there a way to retrieve products without the schema?
I'm using QLM version 7
<xs:schema id=\"NewDataSet\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\"><xs:element name=\"NewDataSet\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\"><xs:complexType><xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\"><xs:element name=\"Table\"><xs:complexType><xs:sequence><xs:element name=\"ID\" type=\"xs:int\" minOccurs=\"0\" /><xs:element name=\"ProductName\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"Major\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"Minor\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"Key\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"GUID\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"Features\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"LatestVersion\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"LatestVersionUrl\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"LatestVersionNotes\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"ReleaseDate\" type=\"xs:dateTime\" minOccurs=\"0\" /><xs:element name=\"PrK\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"PuK\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"VendorID\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"VendorProductID\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"MPrK\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"MPuK\" type=\"xs:string\" minOccurs=\"0\" /><xs:element name=\"ProductData\" type=\"xs:string\" minOccurs=\"0\" /></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema>
-
Official comment
Hi Jaime
There's no way to download the products xml without the schema.
You just need to read the schema and then the actual data.
Example (assuming dataSet is the data returned by DownloadProducts):
DataSet ds = new DataSet("NewDataSet");
XmlReader reader = new XmlTextReader(dataSet, XmlNodeType.Element, null);
ds.ReadXmlSchema(reader);
ds.ReadXml(reader);Comment actions
Please sign in to leave a comment.
Comments
1 comment