C++ Builder怎样访问浮窗(XML)的form?

hexx 2016-07-11 10:21:37
开发环境:C++ Builder XE8

有一个网页的浮窗的xml是这样的:
<?xml version="1.0" encoding="utf-8"?>
<root><![CDATA[<h3 class="flb">
<em>标题</em>
</h3>
<form id="qd_win" method="post" action="..." onkeydown="...">
<div class="f_c" style="width:690px;margin:10px;">
...
<table width="100%" cellpadding="0" cellspacing="0" align="center">
...
<table summary="Qd" cellspacing="0" cellpadding="0" class="tfm">
...
<tr id="mode1" style="display:;">
<th><label for="inputtxt">输入内容</label></th>
<td><input type="text" name="inputtxt" id="inputtxt" size="25" class="px" /></td>
<td></td></tr>
...
</table></table></div>
<p class="o pns">
<button type="button" class="pn pnc" onclick="showWindow('qwindow', 'qd_win', 'post', '0');return false">点我提交</button>
</p></form>]]></root>


我用以下语句取节点:
_di_IXMLDocument document = NewXMLDocument();
document = LoadXMLDocument(URL);
document->Active = true;
_di_IXMLNode node = document->DocumentElement;
AnsiString sTemp1 = node->GetText();
AnsiString sTemp2 = node->ChildNodes->Nodes[0]->GetText();


结果sTemp1、sTemp2是一样的,都是“<h3 class="flb"> ...”,这是怎么回事?
另外,我想在输入框inputtxt中自动赋字符串,然后执行showWindow('qwindow', 'win_id', 'post', '0'); 应怎样弄?
...全文
121 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
hexx 2016-07-15
  • 打赏
  • 举报
回复
解决了,换个思路,用CppWebBrowser1->Navigate(URL, NULL, NULL, NULL, vHeaders);解决了
QuickReport is a set of components and controls that allow reports to be designed and previewed in the Delphi and C++ Builder IDEs. Applications including Quickreport functionality can then be deployed royalty free. QuickReport is a banded report generator written in 100% Delphi code that integrates very closely with Delphi and C++Builder. Design reports within the Delphi/C++Builder IDE using the form designer as a report designer. Basic Features Report Designing - QuickReport is a banded report generator written in Delphi. Integrated very closely with Delphi and C++Builder, reports are designed in the Delphi IDE, using the IDE form designer as a report designer. Data connectivity - Quickreport can use any data component descended from the VCL TDataset class. The abstract table component provides a means to access any data that can be seen by Delphi or C++Builder while retaining all report features. Output modes - reports may be sent directly to a printer, saved in document format for later viewing, or saved as HTML, PDF, XML, CSV, XL, WMF or ASCII format. HTML and PDF may be streamed for fileless output. Features in detail Standard preview Thumbnails and text search MemoryLimit property of TQRPrinterSettings enables suppression of temporary files. Temporary files will be created if more memory is required than set. The PDF and HTML export filters do not create temporary files PrintQuality, Collate and Colour printer settings are in the report printer settings and the QRPrinterSetup dialogue box Composite report upgrade enables exporting. TCompositeReport has an ExportToFilter method for use with the PDF, HTML XML and XL filters Frames and background exports have been implemented. Band and control frames and backgrounds will be exported Export Filters can concatenate reports; PDF, HTML and XLS filters will take several reports The Direct print for metafil method may be called to send a saved report directly to the selected printer. Printer settings are respected and take precedence over internal report settings when possible Abstract dataset (Table) enables reports to be designed around a set of fields. Data to the fields can be fed in an event that is called when the dataset advances. Reports behave exactly as with a usual dataset XML/XSLT export filter outputs the document (not the data) as a browser viewable XML/XSLT document. A stylesheet for browser viewing is supplied Transparent bands and background image property is a QRImage control placed on the report (not on a band). The control remains invisible but its bitmap is painted onto each page before other printing. Bands may be set to Transparent to stop them over-painting the background Memo and RichText routines calculate the expanded height of a band and is is possible to stop bands breaking across pages without writing code RichText controls export to PDF, XML and HTML as images PDF filter enables TrueType fonts to be embeded, does not make temporary files and has a corresponding control that integrates with the preview The HTML (Web) filter produces smaller files and has properties to fix image linking difficulties and to improve the page-to-page links PDF, HTML and XML filters on palette and in preview controls integrate into the preview save menu when put on a form. Home: http://www.quickreport.co.uk/ProductInfo.aspx

1,317

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 网络及通讯开发
社区管理员
  • 网络及通讯开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧