So I am trying to figure something out, been reading a lot on stackoverflow. I have a data feed with over 6 thousand products, it's for my webshop.
<product>
<id>0000</id>
<category><![CDATA[2403,2449,2462]]></category>
<name><![CDATA[XXL Bierlaars]]></name>
<attribute1/>
<attribute2/>
<value1/>
<value2/>
<description>Test</description>
<brand>3209</brand>
<feature/>
<price>30</price>
<pvp>11.99</pvp>
<pvd>5.99</pvd>
<iva>21</iva>
<video>0</video>
<ean13>0000</ean13>
<width>16</width>
<height>23.5</height>
<depth>10.5</depth>
<weight>0.63</weight>
<stock>6</stock>
<date_add>2012-05-10 17:34:12</date_add>
<date_upd>2019-12-30 15:09:25</date_upd>
<image1>https://www.google.com</image1>
<image2>https://www.google.com</image2>
<image3/>
<image4/>
<image5/>
<image6/>
<image7/>
<image8/>
</product>
So I want to edit all the <category>
ids so in this example 2403,2449,2462 to the corresponding text.
Example:
What would be the best way to do this?
Code I got so far:
XDocument doc = XDocument.Load("test.xml");
foreach(XNode node in doc.DescendantNodes())
{
if(node is XElement)
{
XElement element = (XElement)node;
if (element.Name.LocalName.Equals("category"))
{
}
}