This is the xml:
<?xml version="1.0"?>
<model xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" identifier="id-
5f3a493ba7067b8a30bfbf6b"
xmlns="http://www.opengroup.org/xsd/archimate/3.0/">
<name xml:lang="EN"></name>
<views>
<diagrams>
<view identifier="id-4bad55d7-9619-4f21-bcc2-47ddb19d57b3">
<name xml:lang="EN">1shape</name>
<node xmlns:q1="" xsi:type="q1:Shape" identifier="id-97d9fcda-f478-4564-9abd-e2f544d2e292" x="10" y="30" w="1" h="1" nameinternal="BD_shapes_av_Square" shapeId="5bc59d14ec9d2633e8ea102e" angle="0" isgroup="False" alignment="" textalign="0" size="696 360">
<label xml:lang="EN" />
<style>
<fillColor r="102" g="170" b="215" />
<font name="Lato" size="13">
<color r="255" g="255" b="255" />
</font>
</style>
</node>
<node xmlns:q2="" xsi:type="q2:Shape" identifier="id-3b754535-530f-49d2-9e7b-113df0659af9" x="226" y="114" w="1" h="1" nameinternal="BD_shapes_av_Coffee" shapeId="5dad5a884527ecc5c8c4871b" angle="0" isgroup="False" alignment="" textalign="0" size="52.3 72">
<label xml:lang="EN" />
<style>
<fillColor r="102" g="45" b="145" />
<font name="Lato" size="13">
<color r="255" g="255" b="255" />
</font>
</style>
</node>
</view>
</diagrams>
I need to check if the node xsi:type attribute value is Shape or not. I have the xml loaded in XDocument I've tried to get to the node element
xDocument.Descendants("views").Attributes("xsi:type");
If I use
xDocument.Root.Element("views"); - it returns null
Thanks in advance!