P
Pratik Parikh
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 PostFeedbackResponseAsDataSet(ResponseDataSet
response,Int32 feedbackMaximumResponseSize)
{
try
{
String stream = "";
XmlDataDocument xmldom = new XmlDataDocument(response);
if(xmldom.HasChildNodes)
{
<!--Problem-->stream = xmldom.FirstChild.InnerXml.ToString
(); if(stream.Length > feedbackMaximumResponseSize)
{
throw(new ArgumentException("Feedback response exceeds
maximum allowed size for this feedback"));
}
DAL.InsertResponses(stream);
}
}
catch(Exception e)
{
Utility.Logger.WriteEntry(e.Message +"\t" + csStackTrace +
e.StackTrace);
throw(e);
}
}
<comment>
<FeedbackResponse Id=\"bca3180b-6e66-47f1-9ed1-
6acdfa8c986a\"
xmlns=\"http://tempuri.org/SampleResponse.xsd\"><Question
Id=\"1\" xmlns=\"\"><Answer Id=\"1\"
Text=\"dddddddddddddd\"></Answer></Question><Question
Id=\"2\" xmlns=\"\"><Answer Id=\"3
\"></Answer></Question><Question Id=\"3\"
xmlns=\"\"><Answer Id=\"5\"></Answer></Question><Question
Id=\"4\" xmlns=\"\"><Answer Id=\"14
\"></Answer></Question><Question Id=\"5\"
xmlns=\"\"><Answer 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><Question Id=\"6\"
xmlns=\"\"><Answer 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></FeedbackResponse>
</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 PostFeedbackResponseAsDataSet(ResponseDataSet
response,Int32 feedbackMaximumResponseSize)
{
try
{
String stream = "";
XmlDataDocument xmldom = new XmlDataDocument(response);
if(xmldom.HasChildNodes)
{
<!--Problem-->stream = xmldom.FirstChild.InnerXml.ToString
(); if(stream.Length > feedbackMaximumResponseSize)
{
throw(new ArgumentException("Feedback response exceeds
maximum allowed size for this feedback"));
}
DAL.InsertResponses(stream);
}
}
catch(Exception e)
{
Utility.Logger.WriteEntry(e.Message +"\t" + csStackTrace +
e.StackTrace);
throw(e);
}
}
<comment>
<FeedbackResponse Id=\"bca3180b-6e66-47f1-9ed1-
6acdfa8c986a\"
xmlns=\"http://tempuri.org/SampleResponse.xsd\"><Question
Id=\"1\" xmlns=\"\"><Answer Id=\"1\"
Text=\"dddddddddddddd\"></Answer></Question><Question
Id=\"2\" xmlns=\"\"><Answer Id=\"3
\"></Answer></Question><Question Id=\"3\"
xmlns=\"\"><Answer Id=\"5\"></Answer></Question><Question
Id=\"4\" xmlns=\"\"><Answer Id=\"14
\"></Answer></Question><Question Id=\"5\"
xmlns=\"\"><Answer 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><Question Id=\"6\"
xmlns=\"\"><Answer 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></FeedbackResponse>
</comment>