First off, I'm sorry for the name. I couldn't think of a way to describe my issue in a question form. But this is what I'm trying to do.
Here is what my xml is looking like:
<Settings>
<Display_Settings>
<Screen>
<Name Name="Screen" />
<ScreenTag Tag="Screen Tag" />
<LocalPosition X="12" Y="81" Z="28" />
<Width Width="54" />
<Height Height="912" />
</Screen>
<Camera_Name Name="Camera">
<CameraTag Tag="Camera Tag" />
<LocalPosition X="354" Y="108" Z="Z Local Position" />
<Far Far="98" />
<Near Near="16" />
<FOV FOV="78" />
<AspectRatio AspectRatio="1" />
<ScreenDistance ScreenDistance="2" />
</Camera_Name>
</Display_Settings>
</Settings>
What I want is to access the attribute values stored within my local position node. I got some help with this and I can access the screens local position attribute value with this code:
var xdoc = XDocument.Load("C:\\Test.xml");
int x = int)xdoc.Descendants("LocalPosition").First().Attribute("X");
This happily returns 12 when I debug it. But, I also want to my cameras local position to be out putted as well.
Can someone please show me how to do this?