Home > Back-end >  Delphi why not return values, consult
Delphi why not return values, consult

Time:10-27

http://www.awcn.cc/webservice/GetAlbumInfo.asmx? Op=GetAlbumInfoDataTable
In this web site to fill in a username, then click call, returns the XML values, such as the returned are as follows:
<? The XML version="1.0" encoding="utf-8"?>










0 & lt;/AlbumID>
The default album & lt;/title> <br/></Table> <br/><Table diffgr: id="Table1" msdata: rowOrder="1" & gt; <br/><AlbumID> 2030 & lt;/AlbumID> <br/><Title> Wedding dress & lt;/title> <br/></Table> <br/><Table diffgr: id="Table2" msdata: rowOrder="2" & gt; <br/><AlbumID> 1481 & lt;/AlbumID> <br/><Title> I & lt;/title> <br/></Table> <br/><Table diffgr: id="Table3" msdata: rowOrder="3" & gt; <br/><AlbumID> 364 & lt;/AlbumID> <br/><Title> I am a photo album 2 & lt;/title> <br/></Table> <br/><Table diffgr: id="Table4" msdata: rowOrder="4" & gt; <br/><AlbumID> 351 & lt;/AlbumID> <br/><Title> Romantic journey & lt;/title> <br/></Table> <br/></NewDataSet> <br/></diffgr: diffgram> <br/></DataTable> <br/><br/>Why not return values in Delphi? The code is as follows: <br/>The unit Unit1; <br/><br/>Interface <br/><br/>USES the <br/>Windows, Messages, SysUtils, Variants, Classes, Controls, StdCtrls, Graphics, Forms, <br/>Dialogs, xmldom XMLIntf msxmldom, XMLDoc; <br/><br/>Type <br/>TForm1=class (TForm) <br/>XMLDocument1: TXMLDocument; <br/>Button2: TButton; <br/>ComboBox1: TComboBox; <br/>Procedure FormCreate (Sender: TObject); <br/>Procedure Button2Click (Sender: TObject); <br/>Private <br/>{Private declarations} <br/>Public <br/>{Public declarations} <br/>end; <br/><br/>Var <br/>Form1: TForm1; <br/><br/>Implementation <br/><br/>{$R *. DFM} <br/><br/>Procedure TForm1. FormCreate (Sender: TObject); <br/>The begin <br/>XMLDocument1. LoadFromFile (' test1. XML); <br/>end; <br/><br/>Procedure TForm1. Button2Click (Sender: TObject); <br/>Var <br/>The nodeList: IXMLNodeList; <br/>Node: IXMLNode; <br/>I: integer; <br/>The begin <br/>NodeList:=XMLDocument1 DocumentElement..childnodes; <br/>For I:=0 to nodeList. Do the Count - 1 <br/>The begin <br/>Node:=nodeList [I]; <br/>If the node. The NodeName='Table' then <br/>Combobox1. Items. The Add (node.childnodes [' AlbumID ']. Text + <br/>"' + node..childnodes [' title ']. Text); <br/>end; <br/>end; <br/><br/>End. <br/><p class="article - content rp"> CodePudding user response: </p>XMLDocument1. LoadFromFile (' test1. XML); <br/>Sorry, here should be: <br/>XMLDocument1. LoadFromFile (' http://www.awcn.cc/webservice/GetAlbumInfo.asmx/GetAlbumInfoDataTable ');<p class="article - content rp"> CodePudding user response: </p>Google search webservice Delphi call<p class="article - content rp"> CodePudding user response: </p>The original poster is using a WebService, have to learn how to import the WSDL in Delphi, how to use THttpRio objects such as <br/>Your code is just loading an XML document, can not reach the effect of this call,<p class="article - content rp"> CodePudding user response: </p>Formatting read relevant information </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/Backend/72899.html" target="_blank" style="color:#999">https//www.codepudding.com/Backend/72899.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/Backend/72898.html'>About using Delphi program text</a></div> <div class="detail-arr-right">Next:<a href='/Backend/72900.html'>Memorystream content increase</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=Non-technical+area' target='_blank'>Non-technical area</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul><li><a href="/Backend/72815.html">Consult a WIFI connection, a web page open network connectio</a></li><li><a href="/database/72704.html">The front-end soft test intermediate direction to consult</a></li><li><a href="/Backend/72670.html">For a minute ~ ~ want to consulting Java calls pythone scrip</a></li><li><a href="/Backend/72627.html">The small white consult</a></li><li><a href="/frontend/72566.html">Consult the eldest brother have a small problem, I make a la</a></li><li><a href="/frontend/72558.html">Consult everybody, the younger brother grateful!!!!! JS in t</a></li><li><a href="/other/72470.html">Consult a great god! R language OS installed mlrMBO installa</a></li><li><a href="/database/72402.html">Consult - structure parameters of the external function call</a></li><li><a href="/Backend/72345.html">Consult the Java. Lang. IllegalArgumentException how to solv</a></li><li><a href="/Backend/72313.html">Want to consult with bosses, think ask too basis also would </a></li> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>