返回顶部
首页 > 资讯 > 精选 >Java object queries using JXPath
  • 163
分享到

Java object queries using JXPath

2023-06-03 02:06:04 163人浏览 泡泡鱼
摘要

CompanyDepartmentEmployee (name, job title, age)Acme Inc.SalesJohnny, Sales rep, 45Sarah, Sales rep, 33Magda, Office ass

Company

Department

Employee (name, job title, age)

Acme Inc.

Sales

Johnny, Sales rep, 45

Sarah, Sales rep, 33

Magda, Office assistant, 27

Accounting

Steve, Head controller, 51

Peter, Assistant controller, 31

Susan, Office assistant, 27

With that in place, let's start using JXPath!

Executing simple JXPath queries

The simplest query possible extracts a single object from the object tree. For example, to retrieve Company, use the following code:

JXPathContext context = JXPathContext.newContext(company);Company c = (Company)context.getValue(".");

--结束END--

本文标题: Java object queries using JXPath

本文链接: https://lsjlt.com/news/232393.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作