Hello... I'm a rookie to c#. So let me see if i can expose properly my
situation.
I developed a stored procedure in sql server 2000 that allows me to
construct my dataset in XML format. the sp's output will look something
similar to this:
<table1 column11="value111" column12="value112" column13="value113" />
<table1 column12="value121" column2="value122" column3="value123" />
<table2 column21="value211" column2="value212" column3="value213" />
<table2 column22="value221" column2="value222" column3="value223" />
etc. etc. etc.
What I'm trying to do is to take this xml data and store it into a dataset
in c#. I understand that I first must append this data (the sp's output)
with the xml root and namespace, so that an XmlReader can interpret it as
legitimate XML data without exploding.
What I was trying to do is to convert this dataset (the one from the sp)
into a string variable and then appending it to a character string that
literally (manually) contains both the root and namespace, something like
this:
(let's assume dt is a datatable object that only contains one column and one
row, being that cell the string representation of my xml data from the sp)
(also, let's assume myDB.xsd is a valid DB schema file in which the data
will be placed. The DB schema XML representation is working fine. The problem
is the data itself)
string myStr = "<ROOT xmlns=\"http://blabla.org/myDB.xsd\"> +
dt.Rows[0][0].ToString() + "</ROOT>";
It seems to me that this doesn't work given I get an error which tells me
that the ">" character is invalid.
Would you please help me? If you need more information, just let me know.
Thanks!