如何扩展HTML元素并从表模式中刮除td元素?

时间:2018-10-17 22:51:47

标签: excel-vba

我正在与一个网站合作,该网站要求用户单击一个对象,将其展开,然后将显示表的架构。这是给Google BigQuery的;一切都是基于网络的。相关的HTML和所有标签如下所示。

<div class="p6n-dynamic-tree-node-wrapper layout-row flex" tabindex="-1" role="treeitem" aria-expanded="false" ng-focus="treeCtrl.handleNgFocus($index)" ng-blur="treeCtrl.handleNgBlur($index)" ng-keydown="treeCtrl.handleKeyPress($event, $index, node)" ng-click="treeCtrl.handleNodeClick(node)" flex="" layout="row" jslog="47815;track:generic_click"> <!----> <span class="p6n-dynamic-tree-node-content" style="padding-left: 56px;"> <span class="p6n-dynamic-tree-fixed-icon-width"> <!----> <!----> </span> <span ng-transclude="" class="p6n-dynamic-tree-transclude-span"> <!----><pan-icon class="p6n-bq-tree-node-icon flex-none" flex="none" ng-if="node.icon" size="18" icon="table">
            <div class="p6n-icon p6n-icon-18 p6n-icon-table">
              <!---->
              <!----><md-icon ng-if="icon != 'working'" class="" md-svg-icon="icon-18:table" ng-attr-aria-label="{{innerAriaLabel === null ?
                                        undefined :
                                        innerAriaLabel || icon}}" role="img" aria-label="table"><svg id="table_cache57" width="100%" height="100%" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M2 2h14v14H2V2zm2 6v2h2V8H4zm0-4v2h10V4H4zm0 8v2h2v-2H4zm4-4v2h2V8H8zm4 0v2h2V8h-2zm-4 4v2h2v-2H8zm4 0v2h2v-2h-2z" fill-rule="evenodd"></path></svg></md-icon><!---->
            </div></pan-icon><!----> <span class="p6n-ellipsis flex" flex=""> tickets </span> <!----> </span> </span> </div>

在扩展表之后,通过单击事件,将显示表模式,并且所有内容都在表下,并带有td元素,如下所示:

<tr pan-table-row="" ng-repeat="field in ctrl.flatSchema | panSortBy:(sortCtrl&amp;&amp;sortCtrl.getActiveKey()):&quot;normal&quot;:sortCache:paginateCtrl  track by field.fullName" ng-init="$last &amp;&amp; panTableCtrl.onRowRepeatEnd()" pan-table-row-after-repeat="field"><!----><!----> <td ng-class="{'p6n-bq-table-schema-clickable-field-name': ctrl.areFieldsClickable()}" ng-click="ctrl.onFieldClick(field)" role="button" tabindex="0" class="p6n-bq-table-schema-clickable-field-name"> <span class="p6n-color-secondary"></span><b class="p6n-color-primary">submitter_id</b></td> <td>INTEGER</td> <td>NULLABLE</td> <!----><td ng-if="ctrl.showDescription()"></td><!----> </tr>

因此,我的问题是,根据上述说明,是否可以扩展所有基于Web的表,扩展每个表并从每个表模式的td元素中抓取信息?谢谢你的表情。

0 个答案:

没有答案