My XML File is as follows
<?xml version="1.0" encoding="utf-8"?>
<BallList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Brand name="brand1">
<BallName>brand1 ball</BallName>
</Brand
<Brand name="brand2">
<BallName>brand2 ball</BallName>
</Brand>
</BallList>
I need to check for a particular brand with name attribute and if its not present it should be added to the xml file using C# Linq. Can anyone help me in this.