Hi eveyone,
Hi EveryOne,
I am having a real problem, which i am unable to resolve.
The problem is that i am tring to convert the datset using
XmlDataDocument , following is the code. My Problem is that
the while assigning the InnerXml to string variable
stream. it add escape character to my xml stream. after
the code is the example...of xml output. A help will be
really appreciated
public void PostFeedbackRes ponseAsDataSet( ResponseDataSet
response,Int32 feedbackMaximum ResponseSize)
{
try
{
String stream = "";
XmlDataDocument xmldom = new XmlDataDocument (response);
if(xmldom.HasCh ildNodes)
{
<!--Problem-->stream = xmldom.FirstChi ld.InnerXml.ToS tring
(); if(stream.Lengt h > feedbackMaximum ResponseSize)
{
throw(new ArgumentExcepti on("Feedback response exceeds
maximum allowed size for this feedback"));
}
DAL.InsertRespo nses(stream);
}
}
catch(Exception e)
{
Utility.Logger. WriteEntry(e.Me ssage +"\t" + csStackTrace +
e.StackTrace);
throw(e);
}
}
<comment>
<FeedbackRespon se Id=\"bca3180b-6e66-47f1-9ed1-
6acdfa8c986a\"
xmlns=\"http://tempuri.org/SampleResponse. xsd\"><Question
Id=\"1\" xmlns=\"\"><Ans wer Id=\"1\"
Text=\"dddddddd dddddd\"></Answer></Question><Quest ion
Id=\"2\" xmlns=\"\"><Ans wer Id=\"3
\"></Answer></Question><Quest ion Id=\"3\"
xmlns=\"\"><Ans wer Id=\"5\"></Answer></Question><Quest ion
Id=\"4\" xmlns=\"\"><Ans wer Id=\"14
\"></Answer></Question><Quest ion Id=\"5\"
xmlns=\"\"><Ans wer Id=\"15\"></Answer><Answer Id=\"16
\"></Answer><Answer Id=\"17\"></Answer><Answer Id=\"18
\"></Answer><Answer Id=\"19\"></Answer><Answer Id=\"20
\"></Answer><Answer Id=\"21\"></Answer><Answer Id=\"22
\"></Answer><Answer Id=\"23\"></Answer><Answer Id=\"24
\"></Answer><Answer Id=\"25
\"></Answer></Question><Quest ion Id=\"6\"
xmlns=\"\"><Ans wer Id=\"26\"></Answer><Answer Id=\"27
\"></Answer><Answer Id=\"28\"></Answer><Answer Id=\"29
\"></Answer><Answer Id=\"30\"></Answer><Answer Id=\"31
\"></Answer><Answer Id=\"32
\"></Answer></Question></FeedbackRespons e>
</comment>
Hi EveryOne,
I am having a real problem, which i am unable to resolve.
The problem is that i am tring to convert the datset using
XmlDataDocument , following is the code. My Problem is that
the while assigning the InnerXml to string variable
stream. it add escape character to my xml stream. after
the code is the example...of xml output. A help will be
really appreciated
public void PostFeedbackRes ponseAsDataSet( ResponseDataSet
response,Int32 feedbackMaximum ResponseSize)
{
try
{
String stream = "";
XmlDataDocument xmldom = new XmlDataDocument (response);
if(xmldom.HasCh ildNodes)
{
<!--Problem-->stream = xmldom.FirstChi ld.InnerXml.ToS tring
(); if(stream.Lengt h > feedbackMaximum ResponseSize)
{
throw(new ArgumentExcepti on("Feedback response exceeds
maximum allowed size for this feedback"));
}
DAL.InsertRespo nses(stream);
}
}
catch(Exception e)
{
Utility.Logger. WriteEntry(e.Me ssage +"\t" + csStackTrace +
e.StackTrace);
throw(e);
}
}
<comment>
<FeedbackRespon se Id=\"bca3180b-6e66-47f1-9ed1-
6acdfa8c986a\"
xmlns=\"http://tempuri.org/SampleResponse. xsd\"><Question
Id=\"1\" xmlns=\"\"><Ans wer Id=\"1\"
Text=\"dddddddd dddddd\"></Answer></Question><Quest ion
Id=\"2\" xmlns=\"\"><Ans wer Id=\"3
\"></Answer></Question><Quest ion Id=\"3\"
xmlns=\"\"><Ans wer Id=\"5\"></Answer></Question><Quest ion
Id=\"4\" xmlns=\"\"><Ans wer Id=\"14
\"></Answer></Question><Quest ion Id=\"5\"
xmlns=\"\"><Ans wer Id=\"15\"></Answer><Answer Id=\"16
\"></Answer><Answer Id=\"17\"></Answer><Answer Id=\"18
\"></Answer><Answer Id=\"19\"></Answer><Answer Id=\"20
\"></Answer><Answer Id=\"21\"></Answer><Answer Id=\"22
\"></Answer><Answer Id=\"23\"></Answer><Answer Id=\"24
\"></Answer><Answer Id=\"25
\"></Answer></Question><Quest ion Id=\"6\"
xmlns=\"\"><Ans wer Id=\"26\"></Answer><Answer Id=\"27
\"></Answer><Answer Id=\"28\"></Answer><Answer Id=\"29
\"></Answer><Answer Id=\"30\"></Answer><Answer Id=\"31
\"></Answer><Answer Id=\"32
\"></Answer></Question></FeedbackRespons e>
</comment>
Comment