目标内部结构化数据格式(XML,JSON)内容的标准符号? [英] A standard notation to target contents inside structured data formats (XML, JSON)?

查看:265
本文介绍了目标内部结构化数据格式(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)

参考

  • 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆