views:

23

answers:

1

XML is like this:

<element customer-name="blabla" customer-identifier="blabla2">

and I'm using VB.net, doing something 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?

+1  A: 

Use angle brackets to escape the name:

Dim xmlstring = <element customer-name="blabla" customer-identifier="blabla2"/>
Dim name = xmlstring.@<customer-name>
Quartermeister