How to transfer the result to a dataset type



HI,
I use Adomd.net to visit the sql server 2005 analyst service. i
want the get a serializable result.
Code seems like:

AdomdCommand cmd = new AdomdCommand();
....
System.Xml.XmlReader xr = cmd.ExecuteXmlReader();
DataSet ds = new DataSet();
ds.ReadXml(xr);

// string strXml = xr.ReadInnerXml();
// MemoryStream ms = new
MemoryStream( Encoding.Default.GetBytes(strXml) );
// ds.ReadXml( ms );


now, the ds doesn't contain any data.
if use the second mothod, it report me that "the xml contains many
root element". I checked the xml , it contains many root element, such
as "schema" , "OlapInfo","Axes",.

So Is there a way to get a DataSet or DataTable when querying the
cube?
.



Relevant Pages

  • Re: Editing XML
    ... I wonder how text and child nodes are distinguished in the XML text. ... The first is the processing instruction, which you'll typically ignore in XSLT. ... THe next is the element node named "tag" and the last is the text node. ... There is always exactly one root element in a valid XML document. ...
    (comp.lang.pascal.delphi.misc)
  • newbie: writing to xml and namespaces
    ... I'm having some issues when programmatically editing an XML file. ... XmlTextWriter and add the default namespace declaration when writing the ... appears other than in the root element. ...
    (microsoft.public.dotnet.languages.csharp)
  • Missing namespace in XML serialization
    ... We generated a VB wrapper class of this schema using the XSD.exe tool: ... Public Class Response ... Serializing an instance of Response class (defined as root element in the ... schema) we can obtain an XML document that correctly shows the namespace ...
    (microsoft.public.dotnet.xml)
  • Re: Editing XML
    ... THe next is the element node named "tag" and the last is the text node. ... which defines the end of the same element node that <xml> began. ... Most probably it's the implementation of MSXML, where closing tags seem to translate into their own nodes, with the name and type of the opening tag, they only don't have child nodes and attributes. ... There is always exactly one root element in a valid XML document. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Deserialize Business Object
    ... Dim Employee As Employee = CType, ... I am having an issue deserializing a business object from a SQL stored ... As the XML being returned is an XML fragment due to not having a single ... Create a new XmlDocument, add the root element to it, then ...
    (microsoft.public.dotnet.xml)