The XSD that are are getting back is an XML document, not a fragment. You need to load the XML into a DOM and get the first node from the XSD document and set it to the node of your other document. The first line is correct.
Thanks, Shawn Wildermuth [EMAIL PROTECTED] > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]] > On Behalf Of franklin gray > Sent: Wednesday, May 01, 2002 11:37 AM > To: [EMAIL PROTECTED] > Subject: [DOTNET] Schema from Dataset > > > I am trying to load a schema from a dataset into a node of an > xmldocument. If I remove the first line of the text below, > it will load. I am not an XML expert but from what I know, > the first line doesn't seem to be a well formated xml node > and that is why loading it into an XMLElement fails. So, > other then removing the first line, any other ideas? If not, > any good ideas on how to remove this line without me getting > burned when ADO.net starts creating a different schema? So > far, the best idea I have to remove the first line is search > for the first ">" and parse from there. > > > > <?xml version="1.0" encoding="utf-16"?> > <xs:schema id="DataSet1" > targetNamespace="http://www.tempuri.org/DataSet1.xsd" > xmlns:mstns="http://www.tempuri.org/DataSet1.xsd" > xmlns="http://www.tempuri.org/DataSet1.xsd" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > You can read messages from the DOTNET archive, unsubscribe > from DOTNET, or subscribe to other DevelopMentor lists at > http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.