0

I m trying loading data table from xml schema. I can see column names on datatable but, i cant see datas. here is my code:

   StringReader sr = new StringReader(dsSorgu.Tables[0].Rows[i]["sorguSonucu"].ToString());
   s.M_Sonucu = new DataTable();
   s.M_Sonucu.ReadXmlSchema(sr);
   srgKullaniciSorgulari.Add(s);

sr contains xml schema.

2 Answers 2

1

An xml schema doe not contain any data, just table, relation, and constraint definitions. You will need to call the ReadXml method to load the actual data (which will be validated by your schema).

Sign up to request clarification or add additional context in comments.

Comments

0

"An XML Schema describes the structure of an XML document."

http://www.w3schools.com/schema/default.asp

If it is a schema it should not have data in it. You need another file with the data in it and the schema can be used to validate that file if necessary.

http://www.w3schools.com/schema/schema_intro.asp See: What is an XML Schema?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.