目标内部结构化数据格式(XML,JSON)内容的标准符号? [英] A standard notation to target contents inside structured data formats (XML, JSON)?
问题描述
以下是问题:
我在一个Web环境中,我有一些结构化的格式表示数据,比如XML或JSON。
我想要定位这些表示内的元素。
Here's the problem: I'm in a Web environment and I have data expressed in some structured format, say XML or JSON. I want to target elements inside these representations.
这里有一个例子:
XML表示的动物园:
The XML representation of a zoo:
<?xml version="1.0" encoding="UTF-8" ?>
<zoo>
<dog>Joe</dog>
<cat>Alfred</cat>
<mouse>Ricky</mouse>
</zoo>
同一个动物园的JSON表示:
The JSON representation of the same zoo:
{
"zoo": {
"dog": "Joe",
"cat": "Alfred",
"mouse": "Ricky"
}
}
喜欢打狗的名字。
我看到有几种技术可以完成任务,但它们绑定到内容键入。 XML具有XPath或Xpointer,JSON具有JSONPath等等。
I see that there are several technologies to accomplish the task but they are bound to the content type. XML has XPath or Xpointer, JSON has JSONPath and so on.
问题是:如果XML和JSON是表示结构化信息(几乎相当的)的两种方式,你是否知道一些高级别,不依赖于实现的符号,这不是特定的表示?
The question is: if XML and JSON are two ways of representing structured information (which are almost equivalent), do you know some high level, implementation-independent notation which is not bound to a specific representation?
CONSTRAINTS:
请注意,我无法使用简单的URL机制。我的意思是,我不能像 http://authority/.../zoo/dog
。
Please consider that I can't go with the plain URL mechanism. I mean, I can't do something like http://authority/.../zoo/dog
.
这里资源是 zoo
,我需要遍历其内容(将其视为内容)。
Here the resource is the zoo
, I need to traverse its content (treating it as a content).
只是为了澄清一点,像 http://authority/.../zoo#dog
将会做的诀窍,因为它分开资源名称(位于#
之前的内容名称)(在#
之后的位置),但我不知道是否以这种方式使用它可以被认为是标准的。另外,#策略要求资源用锚点注释,这对我的情况是不可取的。
Just to clarify a little, something like http://authority/.../zoo#dog
would do the trick because it separates the resource name (what stands before the #
) from the content name (what stands after the #
) but I'm not sure whether if using it in this way can be considered standard or not. In addition, the # strategy requires that the resource is annotated with anchor points, which is not desirable for my case.
推荐答案
问题是:如果XML和JSON是表示结构化信息(几乎相当的)的两种方法,你是否知道一些不受特定表示限制的高级,不依赖于实现的符号? p>
The question is: if XML and JSON are two ways of representing structured information (which are almost equivalent), do you know some high level, implementation-independent notation which is not bound to a specific representation?
这里有一些:
- 资源描述框架(RDF)
- 抽象语法符号(ASN.1)
- 属性列表(PList)
- 注册表文件(注册)
- OData
- Microdata
- EXI
- Canonical S-Expressions(Canonical S-expr)
- Resource Description Framework(RDF)
- Abstract Syntax Notation(ASN.1)
- Property List(PList)
- Registry Files(Reg)
- OData
- Microdata
- EXI
- Canonical S-Expressions(Canonical S-expr)
参考
- 媒体类型问题文本RDF格式
- RDF序列化
- RDF Translator
- JSON编码规则概述(JSON / ER):a
ASN.1编码规则集 - 达尔文Plist Man页面
- 属性列表表示
- 物业列表简介
- 旧式ASCII属性列表
- 属性列表XML标签
- 分发注册表更改
- 如何创建一个全新的注册表配置单元
- 注册COM应用程序
- 如何创建注册表项并在Visual Basic中设置其值
- 为Firefox浏览器创建并实施XPCOM组件
- 分发注册表更改
- JSON / XML- RPC客户端和服务器
- 简明二进制对象表示( CBOR)
- NetworkX
- jsonGRDDL:JSON / XML GRDDL C lient和服务器
- 关联数据API:格式化图表
- OData和Schema.org(pdf)
- Microdata:Extracting JSON
- W3C Wiki:WebSchemas
- Microdata to RDF:Second Edition
- 微数据傻瓜:提取语义注释
- EXI for JSON
- JSONPointer / XPointer
- 证书库服务API
- US6779120:用于指定安全策略的声明语言
- XML签名语法和处理版本1.1
- oEmbed使嵌入第三方视频和图像轻而易举
- Media Types Issues for Text RDF Formats
- RDF Serializations
- RDF Translator
- Abstract Syntax Notation One (ASN.1) Recommendations
- Overview of the JSON Encoding Rules (JSON/ER): a set of encoding rules for ASN.1
- Darwin Plist Man Page
- Property List Representations
- Introduction to Property Lists
- Old-Style ASCII Property Lists
- Property List XML Tags
- Distributing Registry Changes
- How to Create a Brand New Registry Hive
- Registering COM Applications
- How to: Create a Registry Key and Set Its Value in Visual Basic
- Create and implement an XPCOM component for the Firefox browser
- Distributing Registry Changes
- JSON/XML-RPC Client and Server
- Concise Binary Object Representation (CBOR)
- NetworkX
- jsonGRDDL: JSON/XML GRDDL Client and Server
- Linked Data API: Formatting Graphs
- OData and Schema.org (pdf)
- Microdata: Extracting JSON
- W3C Wiki: WebSchemas
- Microdata to RDF: Second Edition
- Microdata for Dummies: Extracting Semantic Annotations
- EXI for JSON
- JSONPointer/XPointer
- Certificate Library Services API
- US6779120: Declarative language for specifying a security policy
- XML Signature Syntax and Processing Version 1.1
- oEmbed makes embedding third party videos and images a breeze
这篇关于目标内部结构化数据格式(XML,JSON)内容的标准符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!