XML is like this:
<element customer-name="blabla" customer-identifier="blabla2">
and I'm using VB.net, doing so开发者_JAVA百科mething like this:
name = xmlstring.<element>.@customer-name
This doesnt work, because you cannot enter "@customer-name" in the LINQ query. Is there way to escape minus sign becoming an operator?
Use angle brackets to escape the name:
Dim xmlstring = <element customer-name="blabla" customer-identifier="blabla2"/>
Dim name = xmlstring.@<customer-name>
精彩评论