Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If what you're trying to do is update attributes of XML this could be one way:</p> <pre><code>XElement elem = XElement.Load("xmlFilePath"); System.Xml.XPath.Extensions.XPathSelectElement(elem, "xpath").SetAttributeValue("attributeName", "newValue"); </code></pre> <p>where xmlFilePath is the path to the XML you're changing, xpath is the path to the element of the xml and attributeName is the name of the nodes attribute you're altering... Ofcourse, you have to add a custom node with attribute to every xml you're using.</p> <p><strong>EDIT:</strong> Since you said you can't modify the XML files in both locations, than all you're left with is to compare the <code>FileInfo</code> properties of the files themselves. </p> <p>And if the <code>FileInfo</code> properties are not what you need, then there's no other solution but to create a tracking db or a file, which will contain attribute values for your Original and Target directory, by which you can compare and do appropriate action. </p> <p>For example, if your Original and Target maps 1 on 1, than you could have a simple table structure like this 'TableName, OriginalValue, TargetValue'. Where you'd keep this 'tracking' data (db, xml file, other...) depends on the number of entries, and your current architecture...</p> <p><strong>EDIT2:</strong> If you wan't to append to the first attribute found you can use this:</p> <pre><code> XElement elem = XElement.Load("myfilepath.xml"); elem.FirstAttribute.SetValue(elem.FirstAttribute.Value + "|myothervalue"); </code></pre>
    singulars
    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.
    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