![](/img/trans.png)
[英]How to query XML with the same element and attribute name using linq
[英]Are there problems with using the same name for an XML element and attribute?
我可以做這樣的事情嗎?
<root>
<element>
<child element="foo" />
</element>
</root>
這樣嗎?
<root>
<element element="foo" />
</root>
有什么缺點嗎?
從技術上講,沒有什么可以阻止您使用XML做到這一點。 不在XML Schema,XQuery或XSLT級別。 但是要考慮兩個方面:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.