XML:子级和父级同名 [英] XML: child and parent with the same name

查看:31
本文介绍了XML:子级和父级同名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在有效的 XML 中,是否可以有与父级同名的子级?例如:

In valid XML, is it possible to have children with the same name as their parent? For example:

<parent>
    <child>
    </child>
    <parent>
    </parent>
</parent>

谢谢.

推荐答案

除了特定的 DTDXSD 会阻止这种情况发生.

There is nothing aside from a specific DTD or XSD that would prevent this.

这篇关于XML:子级和父级同名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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