如何处理重复的属性名称和十六进制值 [英] How to handle duplicate attribute names and hexadecimal values
本文介绍了如何处理重复的属性名称和十六进制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个像这样的未格式化的 XML 文件:
I have an unformatted XML file like this:
<ROOT>
<A0>Hi</A0>
<A1 A="hi" A="how" A="are" A="You?"></A1>
<A2 A2="Bye"> </A2>
<A3>In this tag have hexadecimal value</A3>
</ROOT>
问题:
- 如何处理标签
中的重复属性名称? - 如何处理标记
中的十六进制值?
- how do I handle duplicate attribute name like in tag
<A1>
? - how do I handle hexadecimal values like in tag
<A3>
?
我必须使用这种类型的文件作为 SSIS 包中的源.
I have to use this type of files as a source in a SSIS package.
谢谢
推荐答案
<ROOT>
<A0>Hi</A0>
<A1 A="hi" A="how" A="are" A="You?"></A1>
<A2 A2="Bye"> </A2>
<A3>In this tag have Hexa deimal value </A3>
</ROOT>
根据定义,格式良好的 XML 文档中不允许有重复的属性(在同一元素上).
因此,提供的文本不是 XML 文档,无法被任何兼容的 XML 解析器解析——因此,所描述的问题不存在.
Therefore the provided text isn't an XML document, cannot be parsed by any compliant XML parser -- and therefore, the described problem cannot exist.
这篇关于如何处理重复的属性名称和十六进制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文