Loading [MathJax]/jax/output/CommonHTML/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >无法在XML上执行自定义xpath规则。

无法在XML上执行自定义xpath规则。
EN

Stack Overflow用户
提问于 2014-10-31 00:30:08
回答 1查看 376关注 0票数 0

我正在尝试创建自定义XML规则,但它们不起作用。:(

首先,我的配置:

  • 声纳4.3
  • xml插件1.2

我想在xpath中为XML质量配置文件创建一个自定义规则。该规则永远不会应用,也不会检测到任何违规行为。

我的原则是:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
//ELEMENT/S_TAG/NAME[@tokenValue='root']

我的XML文件:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?xml version="1.0" encoding="UTF-8"  ?>
<root>          
</root>

AST树:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<DOCUMENT tokenValue="<?xml" tokenLine="1" tokenColumn="0">
  <PROLOG tokenValue="<?xml" tokenLine="1" tokenColumn="0">
    <XML_DECL tokenValue="<?xml" tokenLine="1" tokenColumn="0">
      <TOKEN tokenValue="<?xml" tokenLine="1" tokenColumn="0"/>
      <VERSION_INFO tokenValue="version" tokenLine="1" tokenColumn="6">
        <TOKEN tokenValue="version" tokenLine="1" tokenColumn="6"/>
        <EQ tokenValue="=" tokenLine="1" tokenColumn="13">
          <TOKEN tokenValue="=" tokenLine="1" tokenColumn="13"/>
        </EQ>
        <TOKEN tokenValue=""" tokenLine="1" tokenColumn="14"/>
        <VERSION_NUM tokenValue="1." tokenLine="1" tokenColumn="15">
          <TOKEN tokenValue="1." tokenLine="1" tokenColumn="15"/>
          <TOKEN tokenValue="0" tokenLine="1" tokenColumn="17"/>
        </VERSION_NUM>
        <TOKEN tokenValue=""" tokenLine="1" tokenColumn="18"/>
      </VERSION_INFO>
      <ENCODING_DECL tokenValue="encoding" tokenLine="1" tokenColumn="20">
        <TOKEN tokenValue="encoding" tokenLine="1" tokenColumn="20"/>
        <EQ tokenValue="=" tokenLine="1" tokenColumn="28">
          <TOKEN tokenValue="=" tokenLine="1" tokenColumn="28"/>
        </EQ>
        <TOKEN tokenValue=""" tokenLine="1" tokenColumn="29"/>
        <ENC_NAME tokenValue="UTF-8" tokenLine="1" tokenColumn="30">
          <TOKEN tokenValue="UTF-8" tokenLine="1" tokenColumn="30"/>
        </ENC_NAME>
        <TOKEN tokenValue=""" tokenLine="1" tokenColumn="35"/>
      </ENCODING_DECL>
      <TOKEN tokenValue="?>" tokenLine="1" tokenColumn="38"/>
    </XML_DECL>
    <MISC/>
  </PROLOG>
  <ELEMENT tokenValue="<" tokenLine="3" tokenColumn="0">
    <S_TAG tokenValue="<" tokenLine="3" tokenColumn="0">
      <TOKEN tokenValue="<" tokenLine="3" tokenColumn="0"/>
      <NAME tokenValue="root" tokenLine="3" tokenColumn="1">
        <TOKEN tokenValue="root" tokenLine="3" tokenColumn="1"/>
      </NAME>
      <TOKEN tokenValue=">" tokenLine="3" tokenColumn="5"/>
    </S_TAG>
    <CONTENT tokenValue="           

" tokenLine="3" tokenColumn="6">
      <CHAR_DATA tokenValue="           

" tokenLine="3" tokenColumn="6">
        <TOKEN tokenValue="         

" tokenLine="3" tokenColumn="6"/>
      </CHAR_DATA>
    </CONTENT>
    <E_TAG tokenValue="</" tokenLine="5" tokenColumn="0">
      <TOKEN tokenValue="</" tokenLine="5" tokenColumn="0"/>
      <NAME tokenValue="root" tokenLine="5" tokenColumn="2">
        <TOKEN tokenValue="root" tokenLine="5" tokenColumn="2"/>
      </NAME>
      <TOKEN tokenValue=">" tokenLine="5" tokenColumn="6"/>
    </E_TAG>
  </ELEMENT>
  <MISC/>
</DOCUMENT>

以及分析日志:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Retrieve remote issues of project prjtest...
Start SonarQube analysis on prjtest...
INFO: SonarQube Server 4.3
09:26:29.309 INFO  - Preview mode
09:26:29.315 INFO  - Load batch settings
09:26:29.329 DEBUG - Download: http://xxxx/sonar/batch_bootstrap/properties?dryRun=true (no proxy)
09:26:29.554 INFO  - User cache: C:\Users\xxxxx-s\.sonar\cache
09:26:29.567 INFO  - Install plugins
09:26:29.567 DEBUG - Download index of plugins
09:26:29.567 DEBUG - Download: http://xxxxxx/sonar/deploy/plugins/index.txt (no proxy)
09:26:29.598 INFO  - Include plugins: 
09:26:29.599 INFO  - Exclude plugins: devcockpit, buildstability, pdfreport, report, buildbreaker, scmactivity, views, jira
09:26:29.847 DEBUG - Download: http://xxxx/sonar/batch_bootstrap/db?project=fr.sihm.eand:prjtest (no proxy)
09:26:30.111 DEBUG - Dry Run database size: 1 MB
09:26:30.119 INFO  - Create JDBC datasource for jdbc:h2:D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\.sonartmp\preview1414743989840-0
09:26:30.845 DEBUG - Testing JDBC connection
09:26:32.049 INFO  - Initializing Hibernate
09:26:32.053 DEBUG - hibernate.generate_statistics: false
09:26:32.053 DEBUG - hibernate.dialect: org.hibernate.dialect.H2Dialect
09:26:32.053 DEBUG - hibernate.connection.provider_class: org.sonar.jpa.session.CustomHibernateConnectionProvider
09:26:33.503 DEBUG - Loaded 3276 properties from l10n bundles
09:26:35.161 INFO  - Load project settings
09:26:35.161 DEBUG - Download: http://xxxxxx/sonar/batch_bootstrap/properties?project=fr.sihm.eand:prjtest&amp;dryRun=true (no proxy)
09:26:35.216 INFO  - Apply project exclusions
09:26:35.452 DEBUG - ooo Using Connection [jdbc:h2:D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\.sonartmp\preview1414743989840-0, UserName=SONAR, H2 JDBC Driver]
09:26:35.457 DEBUG - ==>  Preparing: select * from projects p where p.id=? 
09:26:35.482 DEBUG - ==> Parameters: 14701(Long)
09:26:35.734 INFO  - -------------  Scan prjtest
09:26:35.763 INFO  - Load module settings
09:26:35.797 DEBUG - Download: http://xxxx/sonar/batch_bootstrap/properties?project=fr.sihm.eand:prjtest&amp;dryRun=true (no proxy)
09:26:36.162 DEBUG - Available languages:
09:26:36.163 DEBUG -   * Java => "java"
09:26:36.163 DEBUG -   * Web => "web"
09:26:36.163 DEBUG -   * XML => "xml"
09:26:36.163 DEBUG -   * JavaScript => "js"
09:26:37.142 INFO  - Loading technical debt model...
09:26:37.181 INFO  - Loading technical debt model done: 39 ms
09:26:37.204 INFO  - Loading rules...
09:26:37.711 INFO  - Loading rules done: 507 ms
09:26:37.780 INFO  - Configure Maven plugins
09:26:37.970 INFO  - Compare to previous analysis (2014-10-30)
09:26:37.991 INFO  - Compare over 30 days (2014-10-01, analysis of 2014-10-23 15:42:10.95)
09:26:37.993 INFO  - No quality gate is configured.
09:26:38.340 DEBUG - Initializers : 
09:26:38.340 INFO  - Base dir: D:\001-Projets\Sonar\prjtest
09:26:38.340 INFO  - Working dir: D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core
09:26:38.340 INFO  - Source dirs: D:\001-Projets\Sonar\prjtest\src
09:26:38.340 INFO  - Binary dirs: D:\001-Projets\Sonar\prjtest\bin
09:26:38.340 INFO  - Source encoding: windows-1252, default locale: fr_FR
09:26:38.341 INFO  - Index files
09:26:38.346 DEBUG - Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
09:26:38.346 DEBUG - Declared extensions of language Web were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.jsp,**/*.jspf,**/*.jsf,**/*.php,**/*.erb,**/*.rhtml
09:26:38.346 DEBUG - Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml
09:26:38.347 DEBUG - Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js
09:26:38.438 DEBUG - Language of file 'src/Jx_bad.xml' is detected to be 'xml'
09:26:38.542 DEBUG - Language of file 'src/Jx_G_J_Ds2MoJoDs_good.xml' is detected to be 'xml'
09:26:38.544 DEBUG - Language of file 'src/NewFile.xml' is detected to be 'xml'
09:26:38.545 INFO  - 3 files indexed
09:26:38.669 INFO  - Quality profile for xml: SIHM - DTS - Général
09:26:38.726 DEBUG - Sensors : QProfileSensor -> CpdSensor -> XmlSensor -> LineCountSensor -> JaCoCoSensor -> JaCoCoItSensor -> JaCoCoOverallSensor -> InitialOpenIssuesSensor -> ProfileEventsSensor -> ProjectLinksSensor
09:26:38.727 INFO  - Sensor QProfileSensor...
09:26:38.739 INFO  - Sensor QProfileSensor done: 12 ms
09:26:38.740 INFO  - Sensor CpdSensor...
09:26:38.740 DEBUG - Detection of duplicated code is not supported for xml
09:26:38.740 INFO  - Sensor CpdSensor done: 0 ms
09:26:38.740 INFO  - Sensor XmlSensor...
09:26:39.126 INFO  - Sensor XmlSensor done: 386 ms
09:26:39.127 INFO  - Sensor LineCountSensor...
09:26:39.137 DEBUG - Count comment in D:\001-Projets\Sonar\prjtest\src\Jx_G_J_Ds2MoJoDs_good.xml
09:26:39.167 DEBUG - LineCountSensor: src/Jx_G_J_Ds2MoJoDs_good.xml:920,17,0
09:26:39.168 DEBUG - Count comment in D:\001-Projets\Sonar\prjtest\src\Jx_bad.xml
09:26:39.172 DEBUG - LineCountSensor: src/Jx_bad.xml:10,0,0
09:26:39.174 DEBUG - Count comment in D:\001-Projets\Sonar\prjtest\src\NewFile.xml
09:26:39.177 DEBUG - LineCountSensor: src/NewFile.xml:5,2,0
09:26:39.177 INFO  - Sensor LineCountSensor done: 51 ms
09:26:39.177 INFO  - Sensor JaCoCoSensor...
09:26:39.188 INFO  - Project coverage is set to 0% as no JaCoCo execution data has been dumped: D:\001-Projets\Sonar\prjtest\target\jacoco.exec
09:26:39.205 WARN  - Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?
09:26:39.205 INFO  - Sensor JaCoCoSensor done: 28 ms
09:26:39.206 INFO  - Sensor JaCoCoItSensor...
09:26:39.208 INFO  - Project coverage is set to 0% as no JaCoCo execution data has been dumped: D:\001-Projets\Sonar\prjtest\target\jacoco-it.exec
09:26:39.209 WARN  - Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?
09:26:39.209 INFO  - Sensor JaCoCoItSensor done: 3 ms
09:26:39.209 INFO  - Sensor JaCoCoOverallSensor...
09:26:39.209 INFO  - Sensor JaCoCoOverallSensor done: 0 ms
09:26:39.209 INFO  - Sensor InitialOpenIssuesSensor...
09:26:39.232 INFO  - Sensor InitialOpenIssuesSensor done: 23 ms
09:26:39.233 INFO  - Sensor ProfileEventsSensor...
09:26:39.266 INFO  - Sensor ProfileEventsSensor done: 33 ms
09:26:39.266 INFO  - Sensor ProjectLinksSensor...
09:26:39.285 INFO  - Sensor ProjectLinksSensor done: 19 ms
09:26:39.436 INFO  - Execute decorators...
09:26:39.437 DEBUG - Decorators: ManualMeasureDecorator -> org.sonar.issuesreport.tree.ResourceTree@480994d3 -> SumDuplicationsDecorator -> org.sonar.plugins.design.batch.ProjectDsmDecorator@7146c6ea -> FileTangleIndexDecorator -> org.sonar.plugins.core.issue.IssueTrackingDecorator@a5d23c9 -> UnitTestDecorator -> org.sonar.plugins.core.sensors.DirectoriesDecorator@6065bcb7 -> org.sonar.plugins.core.sensors.FilesDecorator@1ee6434 -> org.sonar.plugins.core.timemachine.TimeMachineConfigurationPersister@59ec5a0b -> org.sonar.plugins.core.timemachine.NewCoverageAggregator@71d78cac -> org.sonar.plugins.uselesscodetracker.decorator.TempMethodLinesDecorator@550f522b -> org.sonar.plugins.uselesscodetracker.decorator.DuplicationsDecorator@6a7fc4c1 -> f(lines) -> f(generated_lines) -> f(ncloc) -> f(generated_ncloc) -> f(classes) -> f(packages) -> f(functions) -> f(accessors) -> f(statements) -> f(public_api) -> f(comment_lines) -> f(comment_blank_lines) -> f(public_undocumented_api) -> f(commented_out_code_lines) -> f(complexity) -> f(complexity_in_classes) -> f(complexity_in_functions) -> f(class_complexity_distribution) -> f(function_complexity_distribution) -> f(file_complexity_distribution) -> f(lines_to_cover) -> f(uncovered_lines) -> f(conditions_to_cover) -> f(uncovered_conditions) -> f(it_lines_to_cover) -> f(it_uncovered_lines) -> f(it_conditions_to_cover) -> f(it_uncovered_conditions) -> f(overall_lines_to_cover) -> f(overall_uncovered_lines) -> f(overall_conditions_to_cover) -> f(overall_uncovered_conditions) -> f(rfc) -> f(rfc_distribution) -> f(lcom4_distribution) -> f(package_cycles) -> f(package_tangles) -> f(package_feedback_edges) -> f(package_edges_weight) -> f(new_lines_to_cover) -> f(new_uncovered_lines) -> f(new_conditions_to_cover) -> f(new_uncovered_conditions) -> f(new_it_lines_to_cover) -> f(new_it_uncovered_lines) -> f(new_it_conditions_to_cover) -> f(new_it_uncovered_conditions) -> f(new_overall_lines_to_cover) -> f(new_overall_uncovered_lines) -> f(new_overall_conditions_to_cover) -> f(new_overall_uncovered_conditions) -> org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator@2c7c898a -> PackageTangleIndexDecorator -> CountUnresolvedIssuesDecorator -> CountFalsePositivesDecorator -> org.sonar.plugins.core.technicaldebt.DebtDecorator@23dc70c1 -> org.sonar.plugins.core.technicaldebt.NewDebtDecorator@53b907d9 -> CommentDensityDecorator -> org.sonar.plugins.uselesscodetracker.decorator.TotalDecorator@1842dc39 -> f(file_complexity) -> f(class_complexity) -> f(function_complexity) -> org.sonar.plugins.core.sensors.CoverageDecorator@6167c42f -> org.sonar.plugins.core.sensors.LineCoverageDecorator@2cbc2db2 -> org.sonar.plugins.core.sensors.BranchCoverageDecorator@2de96eba -> org.sonar.plugins.core.sensors.ItLineCoverageDecorator@6296e4bf -> org.sonar.plugins.core.sensors.ItCoverageDecorator@220cda54 -> org.sonar.plugins.core.sensors.ItBranchCoverageDecorator@39109603 -> org.sonar.plugins.core.sensors.OverallLineCoverageDecorator@4d3990a5 -> org.sonar.plugins.core.sensors.OverallCoverageDecorator@18df26a1 -> org.sonar.plugins.core.sensors.OverallBranchCoverageDecorator@5c459194 -> org.sonar.plugins.core.issue.WeightedIssuesDecorator@fe38c0e -> ViolationDensityDecorator -> IssuesDensityDecorator -> VariationDecorator
09:26:39.617 DEBUG - Decorator time:
    ManualMeasureDecorator: 12ms
    org.sonar.issuesreport.tree.ResourceTree@480994d3: 1ms
    SumDuplicationsDecorator: 7ms
    org.sonar.plugins.design.batch.ProjectDsmDecorator@7146c6ea: 0ms
    FileTangleIndexDecorator: 0ms
    org.sonar.plugins.core.issue.IssueTrackingDecorator@a5d23c9: 75ms
    UnitTestDecorator: 1ms
    org.sonar.plugins.core.sensors.DirectoriesDecorator@6065bcb7: 1ms
    org.sonar.plugins.core.sensors.FilesDecorator@1ee6434: 0ms
    org.sonar.plugins.core.timemachine.TimeMachineConfigurationPersister@59ec5a0b: 5ms
    org.sonar.plugins.core.timemachine.NewCoverageAggregator@71d78cac: 3ms
    org.sonar.plugins.uselesscodetracker.decorator.TempMethodLinesDecorator@550f522b: 10ms
    org.sonar.plugins.uselesscodetracker.decorator.DuplicationsDecorator@6a7fc4c1: 0ms
    f(lines): 0ms
    f(generated_lines): 0ms
    f(ncloc): 0ms
    f(generated_ncloc): 0ms
    f(classes): 0ms
    f(packages): 0ms
    f(functions): 0ms
    f(accessors): 0ms
    f(statements): 0ms
    f(public_api): 0ms
    f(comment_lines): 0ms
    f(comment_blank_lines): 0ms
    f(public_undocumented_api): 0ms
    f(commented_out_code_lines): 0ms
    f(complexity): 0ms
    f(complexity_in_classes): 1ms
    f(complexity_in_functions): 0ms
    f(class_complexity_distribution): 0ms
    f(function_complexity_distribution): 0ms
    f(file_complexity_distribution): 0ms
    f(lines_to_cover): 0ms
    f(uncovered_lines): 0ms
    f(conditions_to_cover): 0ms
    f(uncovered_conditions): 0ms
    f(it_lines_to_cover): 1ms
    f(it_uncovered_lines): 0ms
    f(it_conditions_to_cover): 1ms
    f(it_uncovered_conditions): 0ms
    f(overall_lines_to_cover): 0ms
    f(overall_uncovered_lines): 0ms
    f(overall_conditions_to_cover): 1ms
    f(overall_uncovered_conditions): 0ms
    f(rfc): 0ms
    f(rfc_distribution): 0ms
    f(lcom4_distribution): 0ms
    f(package_cycles): 0ms
    f(package_tangles): 0ms
    f(package_feedback_edges): 0ms
    f(package_edges_weight): 0ms
    f(new_lines_to_cover): 0ms
    f(new_uncovered_lines): 0ms
    f(new_conditions_to_cover): 0ms
    f(new_uncovered_conditions): 0ms
    f(new_it_lines_to_cover): 0ms
    f(new_it_uncovered_lines): 0ms
    f(new_it_conditions_to_cover): 0ms
    f(new_it_uncovered_conditions): 0ms
    f(new_overall_lines_to_cover): 0ms
    f(new_overall_uncovered_lines): 0ms
    f(new_overall_conditions_to_cover): 0ms
    f(new_overall_uncovered_conditions): 0ms
    org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator@2c7c898a: 1ms
    PackageTangleIndexDecorator: 0ms
    CountUnresolvedIssuesDecorator: 14ms
    CountFalsePositivesDecorator: 0ms
    org.sonar.plugins.core.technicaldebt.DebtDecorator@23dc70c1: 5ms
    org.sonar.plugins.core.technicaldebt.NewDebtDecorator@53b907d9: 2ms
    CommentDensityDecorator: 4ms
    org.sonar.plugins.uselesscodetracker.decorator.TotalDecorator@1842dc39: 0ms
    f(file_complexity): 0ms
    f(class_complexity): 0ms
    f(function_complexity): 0ms
    org.sonar.plugins.core.sensors.CoverageDecorator@6167c42f: 1ms
    org.sonar.plugins.core.sensors.LineCoverageDecorator@2cbc2db2: 0ms
    org.sonar.plugins.core.sensors.BranchCoverageDecorator@2de96eba: 0ms
    org.sonar.plugins.core.sensors.ItLineCoverageDecorator@6296e4bf: 0ms
    org.sonar.plugins.core.sensors.ItCoverageDecorator@220cda54: 0ms
    org.sonar.plugins.core.sensors.ItBranchCoverageDecorator@39109603: 0ms
    org.sonar.plugins.core.sensors.OverallLineCoverageDecorator@4d3990a5: 0ms
    org.sonar.plugins.core.sensors.OverallCoverageDecorator@18df26a1: 0ms
    org.sonar.plugins.core.sensors.OverallBranchCoverageDecorator@5c459194: 0ms
    org.sonar.plugins.core.issue.WeightedIssuesDecorator@fe38c0e: 4ms
    ViolationDensityDecorator: 1ms
    IssuesDensityDecorator: 0ms
    VariationDecorator: 25ms

09:26:39.619 DEBUG - 162 measures to dump
09:26:39.706 INFO  - Export results to D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\sonar-report.json
09:26:39.712 INFO  - Store results in database
09:26:39.713 DEBUG - Execute org.sonar.batch.index.ComponentDataPersister
09:26:39.719 DEBUG - Execute org.sonar.batch.issue.IssuePersister
09:26:39.719 DEBUG - IssuePersister skipped in preview mode
09:26:39.719 DEBUG - Execute org.sonar.batch.phases.GraphPersister
09:26:39.804 INFO  - ANALYSIS SUCCESSFUL
09:26:39.807 DEBUG - Post-jobs : org.sonar.issuesreport.ReportJob@276aa33f
09:26:39.807 INFO  - Executing post-job class org.sonar.issuesreport.ReportJob
09:26:39.813 DEBUG - Generating HTML Report to: D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\issues-report\issues-report.html
09:26:40.176 INFO  - HTML Issues Report generated: D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\issues-report\issues-report.html
09:26:40.176 DEBUG - Generating Light HTML Report to: D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\issues-report\issues-report-light.html
09:26:40.212 INFO  - Light HTML Issues Report generated: D:\java\workspaces\wks-luna-SR1-01-Sonar\.metadata\.plugins\org.eclipse.core.resources\.projects\prjtest\org.sonar.ide.eclipse.core\issues-report\issues-report-light.html
09:26:40.236 INFO  - 

-------------  Issues Report  -------------

  No new issue

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

我很困惑。有人能帮我吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-04 07:19:17

我找到了解决方案: xml插件的自定义xpath规则直接在XML文件上工作,而不是在AST树上工作。(与Java插件不同;)

在我的示例中,xpath规则必须是:/root

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26670309

复制
相关文章
扭力弹簧介绍
扭力弹簧是一种机械蓄力结构,主要用于古代弩炮和其他弩类。扭力弹簧通过对材质柔软、韧度较大的弹性材料的扭曲或旋转进行蓄力、利用,使被发射物具有一定的机械能。
枫桦
2022/08/02
8100
ADAMS弹簧的使用
针对带有弹簧的结构无法直接将弹簧模型导入并具备对应的效果,ADAMS View中提供了弹簧模块,可以直接在软件中创建弹簧,本文主要通过案例简单介绍弹簧的使用方法。
学识家
2022/05/05
1.2K0
使用Photoshop实现弹簧字效果
一、准备工作 软件环境:PhotoshopCS6 目的:使用路径实现弹簧字效果 二、实验步骤 1,新建画布  2,背景改为黑色,快捷键 Alt+Delete 3,键入文字 ,发现文字显示不出来,这时选
Zoctopus
2018/06/04
7120
程序员眼中的单词
英语中一个单词可能有很多不同的意思。很多中国开发者外语本来就不好,概念是往往先入为主。甚至在不清楚一般意义的情况下,先记住了特定环境中的意思。 单词 普通人眼中 开发者眼中 socket 插座 套接字 per­for­mance 演出 性能 ATM 自动取款机 异步传输模式 memory 记忆 内存 eclipse 日蚀 一种 IDE oracle 神谕 甲骨文公司 cookie 小甜点 一种 web session 机制 stack 堆 堆栈 port 港口 端口 cardboard 纸盒 Google
我是攻城师
2018/05/14
8840
iOS17适配指南之弹簧动画
YungFan
2023/07/09
6440
iOS17适配指南之弹簧动画
QT应用编程: QSpacerItem(弹簧)隐藏与显示
一、环境介绍 操作系统介绍:win10 64位 QT版本: 5.12.6 二、代码设置QSpacerItem隐藏与显示 UI设计界面上弹簧控件: 方法1: //显示弹簧控件代码 ui->horizontalSpacer->changeSize(100,20,QSizePolicy::Maximum); //设置尺寸与伸缩策略 ui->horizontalLayout->update(); //更新弹簧控件所在的布局器 //隐藏弹簧控件代码 ui->horizontalSpacer->change
DS小龙哥
2022/01/07
2.3K0
QT应用编程: QSpacerItem(弹簧)隐藏与显示
Newton–Raphson法解串联弹簧问题
如图所示的串联弹簧,F=100,弹簧刚度为k1 = 50 + 500u ,k2 = 100+ 200u ,u是弹簧伸长量,则平衡方程为 k1,k2带入得 Newton–Raphson方法就是一种线性迭
fem178
2018/04/08
6930
Newton–Raphson法解串联弹簧问题
Flash/Flex学习笔记(40):弹性运动续--弹簧
上一篇里演示的弹性运动加上摩擦力因素后,物体最终基本上都会比较准确的停在目标位置。但是我们回想一下现实世界中的弹簧,如果把弹簧的一头固定起来(即相当于目标点),而另一端栓一个球,把球拉开或压缩一定距离然后松手,事实上小球永远也不可能到达弹簧固定的那一端(因为弹簧即使压缩到最紧,也总有一定的长度) 所以如果要在Flash里模拟现实中的弹簧,真正的目标点绝不是弹簧的端点,而是目标点再偏移一段距离(即弹簧自然伸展时的长度) var ball:Ball = new Ball(6); addChild(ball);
菩提树下的杨过
2018/01/23
9190
Flash/Flex学习笔记(40):弹性运动续--弹簧
Modified Newton–Raphson method解串联弹簧问题
Newton–Raphson method每迭代一步,需要重新计算切线刚度矩阵,然后求解线性化的方程得到位移增量,计算量大,如图所示 Modified Newton–Raphson method不需要
fem178
2018/04/17
1.3K0
Modified Newton–Raphson method解串联弹簧问题
实现一个带下拉弹簧动画的 ScrollView
在刚推出的 Support Library 25.3.0 里面新增了一个叫 SpringAnimation 的动画,也就是弹簧动画。要是用它来做一个滑动控件下拉回弹的效果,应该不错吧。
NanBox
2019/07/09
1.3K0
旁观者.个性引导页个性引导页
这款个人主页简约而不失优雅,背景图片为随机api,共有38张随机图片,每次刷新都会看到不一样的美图。
小化先森
2023/03/05
1.1K0
冬眠动物克服肌肉萎缩,靠的居然是“肠子”|Science
行早 发自 凹非寺 量子位 | 公众号 QbitAI 由于缺乏规律的食物摄入,哺乳动物如何在冬眠期间维持生理功能一直是个谜。 虽然它们可以通过贴秋膘,慢代谢的方式节约能量,但这还是不够。 更糟糕的是,冬眠导致长时间无法活动,再加上饥饿,会促使身体分解肌肉蛋白以产生能量。 而一旦肌肉蛋白被分解,肌肉萎缩也就在所难免。 那冬眠动物是如何克服这个障碍的呢? Science上最新刊登的一项研究揭示了其中的奥妙。 锁定氮元素流失 在肌肉蛋白被分解这个问题上,最核心的损失是氮元素的流失。 用蛋白质提供能量的同时会有副
量子位
2022/03/04
2450
ubuntu如何修复引导
****前言:**** 今晚快要下班的时候,cp文件夹到U盘里面,由于文件过大并且里面的文件都是代码小文件,想想接近700M大有多少小文件,然而电脑就发烧式的发烫,真不敢想象呢,前所未有的发热,于是我就想关机来让电脑来歇歇,万万没想到的就是,电脑关机出现异常了,这时候我已经意识到电脑maybe出了问题。然后我就立马开机,果然不出我所料,电脑系统进不了了。来公司前我安装了linux+win双系统,电脑开机默认进入的是win系统,看到提示,感觉是win除了问题,真是奇怪:上次使用win系统都没有问题的,让你w
AlicFeng
2018/06/08
9.5K0
SpringBoot之引导类[Application]
  我们不管是做Spring的程序也好,还是做springMvc的程序也好,最终都会运行出一个spring容器出来,而我们所有的对象全部都已Bean的形式交给Spring容器管理。
叫我阿杰好了
2022/11/07
6570
SpringBoot之引导类[Application]
OpenCore引导黑苹果
OpenCore(OC)是一种新的引导方式,随着越来越多的kexts开始放弃Clover, 我相信提早使用OC会对你未来使用黑苹果会有很大的帮助。这是一个自然的现象,就像变色龙被Clover淘汰,而现在OC代替Clover也是大势所趋。你应该需要看一些相关的文章,来帮助你理解我的正文内容,同时也需要下载我推荐的软件:
用户6808043
2022/02/25
2K0
如何引导访客注册
原文出处: gkogan 译文出处:TerryFan 许多初创公司的命运几乎完全取决于一个转换点:访问者何时转换成用户。 很多时候,这个关键的任务落在了再普通不过的“注册”按钮的肩上,而这个可怜的按钮在产品开发中却往往得不到任何考虑和关注。 如果你花一点时间来考虑注册按钮的措辞,也许就能大幅增加注册用户转化率。(当然在访客成为用户之后的事情至关重要,但一旦你有了用户的邮件地址,事情都会变得容易得多。) 各初创公司的注册按钮 为什么“注册”按钮起不了作用 它们被忽略了。当访客重复看到许多网站都共有的元
wangxl
2018/03/08
1.2K0
如何引导访客注册
android覆盖式引导
我们在开发产品的时候,每次发版可能会有一些新的功能需要引导用户使用,以前大部分都是使用截图,然后让设计师把引导的问题修饰好放到图上,现在这张图片就是引导图片,我们只需要用这张图片放到界面上,这样基本上就可以满足引导的作用.
飞雪无情
2018/08/28
1K0
android覆盖式引导
window引导配置bcdedit
以前的系统上有boot.ini配置,现在没有了只能bcdedit修改系统配置,或者msconfig修改(可修改项有限)
sofu456
2020/07/26
9460
使用OC引导ubuntu
按任意键进入输入模式,然后我们需要找到ubuntu的grub引导所在的分区. 直接输入 FS0: 回车,就能进入这个分区,然后再输入ls回车,查看里面的文件,看这个是不是存grub引导的地方.
GOOPHER
2022/03/31
3.3K0
使用OC引导ubuntu
Spring Boot引导过程
引导Spring Boot应用程序的一种方法是使用Spring Initializer。为此需要访问Spring Initializer 网页 www.start.spring.io[1] 并选择 Build,Spring Boot版本和平台。此外还需要提供组,工件和所需的依赖项来运行应用程序。
黑洞代码
2021/07/14
9030
Spring Boot引导过程

相似问题

如何使弹簧引导、空间冬眠和后置How工作?

114

弹簧,冬眠,MySQL应力测试

20

冬眠-弹簧中的Haversine公式

117

带弹簧的冬眠.hbm.xml filenotfoundException

26

非弹簧引导应用的弹簧引导测试

37
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文