There is an XMLAQuery.xmla file that needs to be deserialized, and that the output method returns the following list:

public class Node { public string Name { get; set; } public List ChildNodes { get; set; } public List Attributes { get; set; } public Node() { } public Node(string name, List childNodes, List attributes) { Name = name; ChildNodes = childNodes; Attributes = attributes; } } public class NodeAttribute { public string Name { get; set; } public string Value { get; set; } } 

Advise how easy it is to do it, because I tried both the XmlSerializer and Microsoft.AnalysisServices.Utils.Deserialize - and every time I get errors that cannot be fixed.

  • xmltocsharp.azurewebsites.net - feed your xml here, the site will build a working model for you. - Monk
  • The following error popped up: System.InvalidOperationException: There is an error in the XML document (1, 2), ---> System.InvalidOperationException: <Create xmlns = ' schemas.microsoft.com/analysisservices/2003/engine '> was not expected at Microsoft.Xml, Serialization.GeneratedAssembly.XmlSerializationReaderNode.Read4_Node () - AlifirenkoVA

1 answer 1

Very lengthy question. It is not clear what exactly you failed. In general, the sequence is as follows:

  1. See file structure.
  2. On its basis, you create a model (the workpiece of which you apparently already have) using the attributes [XmlRoot], [XmlElement]
  3. Deserialize xml
  • That's exactly what fields in the document a lot. Googling clarified the topic a bit: this XMLA Query script file, it opens in Sql Management Studio, and from it you can create a database on request Execute, the name of the AdventureWorksDW2012Multidimensional-EE database; But what should I do next? in sql studio I see this database, how can I load it in visual studio 2015 to scatter data on the needed List <> 'ah - AlifirenkoVA