Hi,
Well I still get an error even with what you sugested,
the error again is still The 'META' start tag on line 4 does not match the
end tag of 'HEAD'. Line 5, position 3.
The current code is:
Dim XE As New XMLExchange
Dim XMLOutput As XmlReader
XMLOutput = XE.sendXML(xmltosend.ToString)
If XMLOutput.IsEmptyElement Then
Response.Write("Element empty")
End If
If XMLOutput.IsStartElement() Then
Response.Write("Got here - start")
Response.Write(XMLOutput.ReadOuterXml())
End If
Response.Write(XMLOutput.ToString())
Dim XE As New XMLExchange
Dim XMLOutput As XmlReader
XMLOutput = XE.sendXML(xmltosend.ToString)
If XMLOutput.IsEmptyElement Then
Response.Write("Element empty")
End If
If XMLOutput.IsStartElement() Then
Response.Write("Got here - start")
Response.Write(XMLOutput.ReadOuterXml())
End If
THE xmlexchange(XE in my code) has this in it :
public XmlTextReader sendXML(string XMLtoSend)
{
XmlTextReader reader1 = null;
string text1 = this.APIurl + "?xml=" +
HttpUtility.UrlEncode(XMLtoSend);
this.RequestObject = (HttpWebRequest)WebRequest.Create(text1);
this.RequestObject.Accept = "text/xml";
this.RequestObject.ContentType = "application/x-www-form-urlencoded";
this.RequestObject.Method = "GET";
this.RequestObject.Timeout = 10000;
//this.RequestObject.Proxy = new WebProxy(this.ProxyString);
try
{
this.ResponseObject =
(HttpWebResponse)this.RequestObject.GetResponse();
reader1 = new XmlTextReader(this.ResponseObject.GetResponseStream());
}
catch (Exception exception1)
{
WebException exception2 = new WebException(exception1.Message);
throw exception2;
}
// return reader1;
return reader1;
is there any other way of seeing that I am getting sent to me?
[quoted text, click to view] "Kevin Yu [MSFT]" wrote:
> Hi Tdar,
>
> To get all the contents of XMLOutput, which is an XmlTextReader, you can
> use ReadOuterXml method. If the XMLOutput's position is at the root node,
> try
>
> Response.Write(XMLOutput.ReadOuterXml())
>
> HTH.
>
> Kevin Yu
> Microsoft Online Community Support
>
> ============================================================================
> ==========================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ============================================================================
> ==========================
>
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>