Parsing XML from returned WDSLHow does one parse XML files?How to pretty print XML from Java?How do I read and parse an XML file in C#?REST API error return good practicesWhat characters do I need to escape in XML documents?How do I parse XML in Python?How do I comment out a block of tags in XML?What does <![CDATA[]]> in XML mean?How Do You Parse and Process HTML/XML in PHP?How to pretty print XML from the command line?
What if somebody invests in my application?
What does 사자 in this picture means?
Is it okay / does it make sense for another player to join a running game of Munchkin?
In Star Trek IV, why did the Bounty go back to a time when whales were already rare?
Lifted its hind leg on or lifted its hind leg towards?
How can a jailer prevent the Forge Cleric's Artisan's Blessing from being used?
What do you call the infoboxes with text and sometimes images on the side of a page we find in textbooks?
A known event to a history junkie
Simple recursive Sudoku solver
Can a Bard use an arcane focus?
Meta programming: Declare a new struct on the fly
Organic chemistry Iodoform Reaction
Golf game boilerplate
Why are on-board computers allowed to change controls without notifying the pilots?
Are taller landing gear bad for aircraft, particulary large airliners?
Is there a problem with hiding "forgot password" until it's needed?
Resetting two CD4017 counters simultaneously, only one resets
I2C signal and power over long range (10meter cable)
Would it be legal for a US State to ban exports of a natural resource?
Proving by induction of n. Is this correct until this point?
Visiting the UK as unmarried couple
Have I saved too much for retirement so far?
Science Fiction story where a man invents a machine that can help him watch history unfold
Simulating a probability of 1 of 2^N with less than N random bits
Parsing XML from returned WDSL
How does one parse XML files?How to pretty print XML from Java?How do I read and parse an XML file in C#?REST API error return good practicesWhat characters do I need to escape in XML documents?How do I parse XML in Python?How do I comment out a block of tags in XML?What does <![CDATA[]]> in XML mean?How Do You Parse and Process HTML/XML in PHP?How to pretty print XML from the command line?
never worked with web services before so be gentle, think of me as an idiot. I am successfully returning the xml structure below from a web service using a service reference in c# asp.net
<Rows>
<Type>
<ID>5555557</ID>
<Type_Name>Product 1 Name </Type_Name>
<AvailableDate>18/03/2019</AvailableDate>
<AvailableDate>01/04/2019</AvailableDate>
<AvailableDate>15/04/2019</AvailableDate>
<AvailableDate>29/04/2019</AvailableDate>
<AvailableDate>13/05/2019</AvailableDate>
<AvailableDate>28/05/2019</AvailableDate>
<AvailableDate>10/06/2019</AvailableDate>
<AvailableDate>24/06/2019</AvailableDate>
<service>FALSE</service>
</Type>
<Type>
<ID>5555559</ID>
<Type_Name>Product 2 Name </Type_Name>
<AvailableDate>11/03/2019</AvailableDate>
<AvailableDate>25/03/2019</AvailableDate>
<AvailableDate>08/04/2019</AvailableDate>
<AvailableDate>23/04/2019</AvailableDate>
<AvailableDate>07/05/2019</AvailableDate>
<AvailableDate>20/05/2019</AvailableDate>
<AvailableDate>03/06/2019</AvailableDate>
<AvailableDate>17/06/2019</AvailableDate>
<AvailableDate>01/07/2019</AvailableDate>
<AvailableDate>15/07/2019</AvailableDate>
<AvailableDate>29/07/2019</AvailableDate>
<AvailableDate>12/08/2019</AvailableDate>
<AvailableDate>27/08/2019</AvailableDate>
<AvailableDate>09/09/2019</AvailableDate>
<AvailableDate>23/09/2019</AvailableDate>
<service>FALSE</service>
</Type>
</Rows>
I am using a list and stringbuilder to write out the xml and all is working ok for ID and Type_name and ther succsfully displaying.
But having trouble wrapping the availabledates as an array to display as part of the above.
I would have expected another Xml node to reference the availabledates but they are all at the same level.
Any ideas?
enter
SR1.WebService2SoapClient client = new SR1.WebService2SoapClient("WebService2Soap");
XmlNode node = client.getMethodpaiingcredentials(cred1, "cred2");
XmlReader r = XmlReader.Create(new StringReader(node.OuterXml));
//adding to a static list
MyList = (
from e in XDocument.Load(r).Root.Elements("Type")
select new Property //(public class)
ID = (int)e.Element("ID"),
Type = (string)e.Element("Type_Name"),
//Trying to wrap all dates in loop
CDate = (
from o in e.Elements("Type").Elements("AvailableDate")
select new AvailableDates
ADate = (DateTime)o.Element("AvailableDate"),
)
.ToArray()
)
.ToList();
StringBuilder sb = new StringBuilder();
foreach (var xmlID in MyList)
sb.Append("<table border='1px' cellpadding='1' cellspacing='1' class='customers'>n");
sb.Append("<TD>"); sb.Append(xmlID.ID); sb.Append("</TD>");
sb.Append("<TD>"); sb.Append(xmlID.Type_Name); sb.Append("</TD>");
foreach (var OD in myList[0].CDate)
sb.Append("<TD>"); sb.Append(OD.ColDate); sb.Append(" - </TD>");
sb.Append("</TR>n");
sb.Append("</TABLE>");
litCollections.Text = sb.ToString();
here
xml web-services wsdl
add a comment |
never worked with web services before so be gentle, think of me as an idiot. I am successfully returning the xml structure below from a web service using a service reference in c# asp.net
<Rows>
<Type>
<ID>5555557</ID>
<Type_Name>Product 1 Name </Type_Name>
<AvailableDate>18/03/2019</AvailableDate>
<AvailableDate>01/04/2019</AvailableDate>
<AvailableDate>15/04/2019</AvailableDate>
<AvailableDate>29/04/2019</AvailableDate>
<AvailableDate>13/05/2019</AvailableDate>
<AvailableDate>28/05/2019</AvailableDate>
<AvailableDate>10/06/2019</AvailableDate>
<AvailableDate>24/06/2019</AvailableDate>
<service>FALSE</service>
</Type>
<Type>
<ID>5555559</ID>
<Type_Name>Product 2 Name </Type_Name>
<AvailableDate>11/03/2019</AvailableDate>
<AvailableDate>25/03/2019</AvailableDate>
<AvailableDate>08/04/2019</AvailableDate>
<AvailableDate>23/04/2019</AvailableDate>
<AvailableDate>07/05/2019</AvailableDate>
<AvailableDate>20/05/2019</AvailableDate>
<AvailableDate>03/06/2019</AvailableDate>
<AvailableDate>17/06/2019</AvailableDate>
<AvailableDate>01/07/2019</AvailableDate>
<AvailableDate>15/07/2019</AvailableDate>
<AvailableDate>29/07/2019</AvailableDate>
<AvailableDate>12/08/2019</AvailableDate>
<AvailableDate>27/08/2019</AvailableDate>
<AvailableDate>09/09/2019</AvailableDate>
<AvailableDate>23/09/2019</AvailableDate>
<service>FALSE</service>
</Type>
</Rows>
I am using a list and stringbuilder to write out the xml and all is working ok for ID and Type_name and ther succsfully displaying.
But having trouble wrapping the availabledates as an array to display as part of the above.
I would have expected another Xml node to reference the availabledates but they are all at the same level.
Any ideas?
enter
SR1.WebService2SoapClient client = new SR1.WebService2SoapClient("WebService2Soap");
XmlNode node = client.getMethodpaiingcredentials(cred1, "cred2");
XmlReader r = XmlReader.Create(new StringReader(node.OuterXml));
//adding to a static list
MyList = (
from e in XDocument.Load(r).Root.Elements("Type")
select new Property //(public class)
ID = (int)e.Element("ID"),
Type = (string)e.Element("Type_Name"),
//Trying to wrap all dates in loop
CDate = (
from o in e.Elements("Type").Elements("AvailableDate")
select new AvailableDates
ADate = (DateTime)o.Element("AvailableDate"),
)
.ToArray()
)
.ToList();
StringBuilder sb = new StringBuilder();
foreach (var xmlID in MyList)
sb.Append("<table border='1px' cellpadding='1' cellspacing='1' class='customers'>n");
sb.Append("<TD>"); sb.Append(xmlID.ID); sb.Append("</TD>");
sb.Append("<TD>"); sb.Append(xmlID.Type_Name); sb.Append("</TD>");
foreach (var OD in myList[0].CDate)
sb.Append("<TD>"); sb.Append(OD.ColDate); sb.Append(" - </TD>");
sb.Append("</TR>n");
sb.Append("</TABLE>");
litCollections.Text = sb.ToString();
here
xml web-services wsdl
add a comment |
never worked with web services before so be gentle, think of me as an idiot. I am successfully returning the xml structure below from a web service using a service reference in c# asp.net
<Rows>
<Type>
<ID>5555557</ID>
<Type_Name>Product 1 Name </Type_Name>
<AvailableDate>18/03/2019</AvailableDate>
<AvailableDate>01/04/2019</AvailableDate>
<AvailableDate>15/04/2019</AvailableDate>
<AvailableDate>29/04/2019</AvailableDate>
<AvailableDate>13/05/2019</AvailableDate>
<AvailableDate>28/05/2019</AvailableDate>
<AvailableDate>10/06/2019</AvailableDate>
<AvailableDate>24/06/2019</AvailableDate>
<service>FALSE</service>
</Type>
<Type>
<ID>5555559</ID>
<Type_Name>Product 2 Name </Type_Name>
<AvailableDate>11/03/2019</AvailableDate>
<AvailableDate>25/03/2019</AvailableDate>
<AvailableDate>08/04/2019</AvailableDate>
<AvailableDate>23/04/2019</AvailableDate>
<AvailableDate>07/05/2019</AvailableDate>
<AvailableDate>20/05/2019</AvailableDate>
<AvailableDate>03/06/2019</AvailableDate>
<AvailableDate>17/06/2019</AvailableDate>
<AvailableDate>01/07/2019</AvailableDate>
<AvailableDate>15/07/2019</AvailableDate>
<AvailableDate>29/07/2019</AvailableDate>
<AvailableDate>12/08/2019</AvailableDate>
<AvailableDate>27/08/2019</AvailableDate>
<AvailableDate>09/09/2019</AvailableDate>
<AvailableDate>23/09/2019</AvailableDate>
<service>FALSE</service>
</Type>
</Rows>
I am using a list and stringbuilder to write out the xml and all is working ok for ID and Type_name and ther succsfully displaying.
But having trouble wrapping the availabledates as an array to display as part of the above.
I would have expected another Xml node to reference the availabledates but they are all at the same level.
Any ideas?
enter
SR1.WebService2SoapClient client = new SR1.WebService2SoapClient("WebService2Soap");
XmlNode node = client.getMethodpaiingcredentials(cred1, "cred2");
XmlReader r = XmlReader.Create(new StringReader(node.OuterXml));
//adding to a static list
MyList = (
from e in XDocument.Load(r).Root.Elements("Type")
select new Property //(public class)
ID = (int)e.Element("ID"),
Type = (string)e.Element("Type_Name"),
//Trying to wrap all dates in loop
CDate = (
from o in e.Elements("Type").Elements("AvailableDate")
select new AvailableDates
ADate = (DateTime)o.Element("AvailableDate"),
)
.ToArray()
)
.ToList();
StringBuilder sb = new StringBuilder();
foreach (var xmlID in MyList)
sb.Append("<table border='1px' cellpadding='1' cellspacing='1' class='customers'>n");
sb.Append("<TD>"); sb.Append(xmlID.ID); sb.Append("</TD>");
sb.Append("<TD>"); sb.Append(xmlID.Type_Name); sb.Append("</TD>");
foreach (var OD in myList[0].CDate)
sb.Append("<TD>"); sb.Append(OD.ColDate); sb.Append(" - </TD>");
sb.Append("</TR>n");
sb.Append("</TABLE>");
litCollections.Text = sb.ToString();
here
xml web-services wsdl
never worked with web services before so be gentle, think of me as an idiot. I am successfully returning the xml structure below from a web service using a service reference in c# asp.net
<Rows>
<Type>
<ID>5555557</ID>
<Type_Name>Product 1 Name </Type_Name>
<AvailableDate>18/03/2019</AvailableDate>
<AvailableDate>01/04/2019</AvailableDate>
<AvailableDate>15/04/2019</AvailableDate>
<AvailableDate>29/04/2019</AvailableDate>
<AvailableDate>13/05/2019</AvailableDate>
<AvailableDate>28/05/2019</AvailableDate>
<AvailableDate>10/06/2019</AvailableDate>
<AvailableDate>24/06/2019</AvailableDate>
<service>FALSE</service>
</Type>
<Type>
<ID>5555559</ID>
<Type_Name>Product 2 Name </Type_Name>
<AvailableDate>11/03/2019</AvailableDate>
<AvailableDate>25/03/2019</AvailableDate>
<AvailableDate>08/04/2019</AvailableDate>
<AvailableDate>23/04/2019</AvailableDate>
<AvailableDate>07/05/2019</AvailableDate>
<AvailableDate>20/05/2019</AvailableDate>
<AvailableDate>03/06/2019</AvailableDate>
<AvailableDate>17/06/2019</AvailableDate>
<AvailableDate>01/07/2019</AvailableDate>
<AvailableDate>15/07/2019</AvailableDate>
<AvailableDate>29/07/2019</AvailableDate>
<AvailableDate>12/08/2019</AvailableDate>
<AvailableDate>27/08/2019</AvailableDate>
<AvailableDate>09/09/2019</AvailableDate>
<AvailableDate>23/09/2019</AvailableDate>
<service>FALSE</service>
</Type>
</Rows>
I am using a list and stringbuilder to write out the xml and all is working ok for ID and Type_name and ther succsfully displaying.
But having trouble wrapping the availabledates as an array to display as part of the above.
I would have expected another Xml node to reference the availabledates but they are all at the same level.
Any ideas?
enter
SR1.WebService2SoapClient client = new SR1.WebService2SoapClient("WebService2Soap");
XmlNode node = client.getMethodpaiingcredentials(cred1, "cred2");
XmlReader r = XmlReader.Create(new StringReader(node.OuterXml));
//adding to a static list
MyList = (
from e in XDocument.Load(r).Root.Elements("Type")
select new Property //(public class)
ID = (int)e.Element("ID"),
Type = (string)e.Element("Type_Name"),
//Trying to wrap all dates in loop
CDate = (
from o in e.Elements("Type").Elements("AvailableDate")
select new AvailableDates
ADate = (DateTime)o.Element("AvailableDate"),
)
.ToArray()
)
.ToList();
StringBuilder sb = new StringBuilder();
foreach (var xmlID in MyList)
sb.Append("<table border='1px' cellpadding='1' cellspacing='1' class='customers'>n");
sb.Append("<TD>"); sb.Append(xmlID.ID); sb.Append("</TD>");
sb.Append("<TD>"); sb.Append(xmlID.Type_Name); sb.Append("</TD>");
foreach (var OD in myList[0].CDate)
sb.Append("<TD>"); sb.Append(OD.ColDate); sb.Append(" - </TD>");
sb.Append("</TR>n");
sb.Append("</TABLE>");
litCollections.Text = sb.ToString();
here
<Rows>
<Type>
<ID>5555557</ID>
<Type_Name>Product 1 Name </Type_Name>
<AvailableDate>18/03/2019</AvailableDate>
<AvailableDate>01/04/2019</AvailableDate>
<AvailableDate>15/04/2019</AvailableDate>
<AvailableDate>29/04/2019</AvailableDate>
<AvailableDate>13/05/2019</AvailableDate>
<AvailableDate>28/05/2019</AvailableDate>
<AvailableDate>10/06/2019</AvailableDate>
<AvailableDate>24/06/2019</AvailableDate>
<service>FALSE</service>
</Type>
<Type>
<ID>5555559</ID>
<Type_Name>Product 2 Name </Type_Name>
<AvailableDate>11/03/2019</AvailableDate>
<AvailableDate>25/03/2019</AvailableDate>
<AvailableDate>08/04/2019</AvailableDate>
<AvailableDate>23/04/2019</AvailableDate>
<AvailableDate>07/05/2019</AvailableDate>
<AvailableDate>20/05/2019</AvailableDate>
<AvailableDate>03/06/2019</AvailableDate>
<AvailableDate>17/06/2019</AvailableDate>
<AvailableDate>01/07/2019</AvailableDate>
<AvailableDate>15/07/2019</AvailableDate>
<AvailableDate>29/07/2019</AvailableDate>
<AvailableDate>12/08/2019</AvailableDate>
<AvailableDate>27/08/2019</AvailableDate>
<AvailableDate>09/09/2019</AvailableDate>
<AvailableDate>23/09/2019</AvailableDate>
<service>FALSE</service>
</Type>
</Rows>
<Rows>
<Type>
<ID>5555557</ID>
<Type_Name>Product 1 Name </Type_Name>
<AvailableDate>18/03/2019</AvailableDate>
<AvailableDate>01/04/2019</AvailableDate>
<AvailableDate>15/04/2019</AvailableDate>
<AvailableDate>29/04/2019</AvailableDate>
<AvailableDate>13/05/2019</AvailableDate>
<AvailableDate>28/05/2019</AvailableDate>
<AvailableDate>10/06/2019</AvailableDate>
<AvailableDate>24/06/2019</AvailableDate>
<service>FALSE</service>
</Type>
<Type>
<ID>5555559</ID>
<Type_Name>Product 2 Name </Type_Name>
<AvailableDate>11/03/2019</AvailableDate>
<AvailableDate>25/03/2019</AvailableDate>
<AvailableDate>08/04/2019</AvailableDate>
<AvailableDate>23/04/2019</AvailableDate>
<AvailableDate>07/05/2019</AvailableDate>
<AvailableDate>20/05/2019</AvailableDate>
<AvailableDate>03/06/2019</AvailableDate>
<AvailableDate>17/06/2019</AvailableDate>
<AvailableDate>01/07/2019</AvailableDate>
<AvailableDate>15/07/2019</AvailableDate>
<AvailableDate>29/07/2019</AvailableDate>
<AvailableDate>12/08/2019</AvailableDate>
<AvailableDate>27/08/2019</AvailableDate>
<AvailableDate>09/09/2019</AvailableDate>
<AvailableDate>23/09/2019</AvailableDate>
<service>FALSE</service>
</Type>
</Rows>
SR1.WebService2SoapClient client = new SR1.WebService2SoapClient("WebService2Soap");
XmlNode node = client.getMethodpaiingcredentials(cred1, "cred2");
XmlReader r = XmlReader.Create(new StringReader(node.OuterXml));
//adding to a static list
MyList = (
from e in XDocument.Load(r).Root.Elements("Type")
select new Property //(public class)
ID = (int)e.Element("ID"),
Type = (string)e.Element("Type_Name"),
//Trying to wrap all dates in loop
CDate = (
from o in e.Elements("Type").Elements("AvailableDate")
select new AvailableDates
ADate = (DateTime)o.Element("AvailableDate"),
)
.ToArray()
)
.ToList();
StringBuilder sb = new StringBuilder();
foreach (var xmlID in MyList)
sb.Append("<table border='1px' cellpadding='1' cellspacing='1' class='customers'>n");
sb.Append("<TD>"); sb.Append(xmlID.ID); sb.Append("</TD>");
sb.Append("<TD>"); sb.Append(xmlID.Type_Name); sb.Append("</TD>");
foreach (var OD in myList[0].CDate)
sb.Append("<TD>"); sb.Append(OD.ColDate); sb.Append(" - </TD>");
sb.Append("</TR>n");
sb.Append("</TABLE>");
litCollections.Text = sb.ToString();
SR1.WebService2SoapClient client = new SR1.WebService2SoapClient("WebService2Soap");
XmlNode node = client.getMethodpaiingcredentials(cred1, "cred2");
XmlReader r = XmlReader.Create(new StringReader(node.OuterXml));
//adding to a static list
MyList = (
from e in XDocument.Load(r).Root.Elements("Type")
select new Property //(public class)
ID = (int)e.Element("ID"),
Type = (string)e.Element("Type_Name"),
//Trying to wrap all dates in loop
CDate = (
from o in e.Elements("Type").Elements("AvailableDate")
select new AvailableDates
ADate = (DateTime)o.Element("AvailableDate"),
)
.ToArray()
)
.ToList();
StringBuilder sb = new StringBuilder();
foreach (var xmlID in MyList)
sb.Append("<table border='1px' cellpadding='1' cellspacing='1' class='customers'>n");
sb.Append("<TD>"); sb.Append(xmlID.ID); sb.Append("</TD>");
sb.Append("<TD>"); sb.Append(xmlID.Type_Name); sb.Append("</TD>");
foreach (var OD in myList[0].CDate)
sb.Append("<TD>"); sb.Append(OD.ColDate); sb.Append(" - </TD>");
sb.Append("</TR>n");
sb.Append("</TABLE>");
litCollections.Text = sb.ToString();
xml web-services wsdl
xml web-services wsdl
asked Mar 7 at 10:11
CCC AdminCCC Admin
203
203
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55041149%2fparsing-xml-from-returned-wdsl%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55041149%2fparsing-xml-from-returned-wdsl%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown