XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
umesh wanveSubject: Want Help in Getting XML Response ?
Author: umesh wanve
Date: 18 Feb 2006 07:05 AM
Hi there,

i have some problems regarding XML response. When I execute my login button (i am sending the server username and password in XML format) i got XML response in html format which looks like
------------------------------------
XML Response results

<APIEnvelope sessId="5d0j6bwdnp" type="response">
<CmdResponse name="agentConnect" version="1.0">
<Param name="returnCode">
<Value>0</Value>
</Param>
<Param name="agentInfo">
<Struct>
<Param name="webLocale">
<Value>web</Value>
</Param>
<Param name="usePDR">
<Value>0</Value>
</Param>
<Param name="firstName">
<Value>abct</Value>
</Param>
<Param name="sig3">
<Value/>
</Param>
<Param name="sig2">
<Value/>
</Param>
<Param name="sig1">
<Value/>
</Param>
<Param name="hasQueue">
<Value>1</Value>
</Param>
<Param name="choosable">
<Value>1</Value>
</Param>
<Param name="loginEnabled">
<Value>1</Value>
</Param>
<Param name="mailLocale">
<Value>en-US</Value>
</Param>
<Param name="overloadEscalationThreshold">
<Value>1</Value>
</Param>
<Param name="permanentAgent">
<Value>0</Value>
</Param>
<Param name="lastName">
<Value>d</Value>
</Param>
<Param name="alias">
<Value/>
</Param>
<Param name="id">
<Value>user01</Value>
</Param>
<Param name="automaticOverloadEnabled">
<Value>0</Value>
</Param>
<Param name="defaultEmail">
<Value/>
</Param>
<Param name="description">
<Value>user </Value>
</Param>
<Param name="autoSaveInterval">
<Value>0</Value>
</Param>
<Param name="overloadWarningThreshold">
<Value>1</Value>
</Param>
<Param name="timeZone">
<Value>Atlantic/Canary</Value>
</Param>
<Param name="reassignable">
<Value>1</Value>
</Param>
<Param name="automaticEscalationEnabled">
<Value>0</Value>
</Param>
</Struct>
</Param>
</CmdResponse>
</APIEnvelope>


-------------------------------

In IE it looks same. Now i want to retrieve this XML response. So this is code below in C#.net

-----code
WebResponse response = loHttp.GetResponse();

StreamReader sr = new StreamReader(response.GetResponseStream(),Encoding.UTF8);


String mystr1=sr.ReadToEnd();
sr.Close();

XmlTextReader xmlrd=new XmlTextReader(sr); //here i got error saying invalid root element

so it is nt creating valid XML file

--------------

now when i display this string i got this response in html format not in XML. I want it in XML

SO what i have to do ?

How to retrieve only XML response from HTML ?


Thanks
Umesh

Posttop
(Deleted User) Subject: Want Help in Getting XML Response ?
Author: (Deleted User)
Date: 20 Feb 2006 09:59 AM
Hi, Umesh. SSDN is a forum for questions about using Stylus Studio. You might find the information you are looking for in a technology-specific user group (one for C#, for example). W3Schools might also be a good source of information for you:

http://www.w3schools.com/xml/xml_server.asp

Hope this helps.

David Foster
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.