Note that there are some explanatory texts on larger screens.

plurals
  1. POideas to modify attributes of different XML files c#
    primarykey
    data
    text
    <p>here is my scenario,</p> <ol> <li>I copy XML Files from the Original Directory to the Target Directory</li> <li>I modify the file's attributes in the Original Directory</li> <li>I compare the modified file's attribute(from the Original Directory) with the copied file's attribute (in the Target Directory) They shouldn't be the same of course</li> </ol> <p>My problem is that NOT all XML Files have the same attributes.</p> <p>I tried adding a common attribute and modify it but the files are retrieved from a DB and each attribute represents a coloumn there and I can't modify the DB</p> <p>I'm thinking of looping through the attributes, till I reach the first "non-fixed" attribute and modify it. Is that possible? if so how? and if there is other solutions I'll appreciate it even more :)</p> <p>Here is an example of part of my xmls</p> <pre><code>&lt;CtApproachTypes DataclassId="1992A9CE-B048-4676-BFD4-FD81F1A65401" EntityId="1992A9CE-B048-4676-BFD4-FD81F1A65401" Name="PAR" Remark="No Remarks"/&gt; &lt;/CT_ApproachTypes&gt; &lt;MiMissions DataclassId="C196A66B-4FA1-461C-9EEF-95A4F2085051" EntityId="C196A66B-4FA1-461C-9EEF-95A4F2085051" MissionName="Standard" isib="1" &lt;/MiMissions&gt; &lt;StSituations DataclassId="679FAC3C-C9EF-41FD-9A13-957915605F01" EntityId="679FAC3C-C9EF-41FD-9A13-957915605F01" SitName="Standard" Status="C" Template="1"&gt; &lt;/StSituations&gt; </code></pre> <p>I wanna skip the first two attributes and modify the first attribute after them. </p> <p>Note: I checked the XML Files and all of them seem to have an attribute with "-name" in them. I was thinking of using "like" to query.. but a more solid solution would be to modify the first attribute after the first 2.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload