XML 中的元素和节点有什么区别? [英] What's the difference between an element and a node in XML?

查看:37
本文介绍了XML 中的元素和节点有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 XML 处理 Java,我想知道;元素和节点有什么区别?

I'm working in Java with XML and I'm wondering; what's the difference between an element and a node?

推荐答案

Node 对象是整个 DOM 的主要数据类型.

The Node object is the primary data type for the entire DOM.

节点可以是元素节点、属性节点、文本节点或节点类型"一章中解释的任何其他节点类型.

A node can be an element node, an attribute node, a text node, or any other of the node types explained in the "Node types" chapter.

XML 元素是从(包括)元素的开始标记到(包括)元素的结束标记的所有内容.

An XML element is everything from (including) the element's start tag to (including) the element's end tag.

这篇关于XML 中的元素和节点有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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