Friday 15 June 2012

xml - wix XmlConfig: is it possible to insert a new node in a particular position within a parent node -


What I'm researching is use: XmlConfig (or anything in the wix tool chest) used this way The way in which I have permission to create a node on my particular foot node, to establish a node. Here's an example:

  ...  & Lt; ChildNode childAttr1 = "child2 attr1 value" /> & Lt; / ParentNode & gt; ...   

I want to insert a new node between the two children, so that the result will be like this: ... & lt; ParentNode parentAttr1 = "Parental Entry 1 Value" & gt; & Lt; ChildNode childAttr1 = "child1 attr1 value" /> & Lt; ChildNode childAttr1 = "child3 attr1 value" /> & Lt; ChildNode childAttr1 = "child2 attr1 value" /> & Lt; / ParentNode & gt; ...

The code so far holds the node as the last child of the original node and looks like this:

  ... & lt; Util: XmlConfig id = "MY_ID" file = "[PROPERTY_SQLRSPATH] Report server \ rssrvpolicy.config" action = "create" on "install" ElementPath = "/ / parent node" node = "document" sequence = "1" & gt; ; & Lt ;! [CDATA [& lt; ChildNode childAttr1 = "child3 attr1 value" /> ]] & Gt; & Lt; / Util: XmlConfig & gt; ...  

Then, it is summarized in

Edit: Another wrinkle on this topic will be given to this structure:

Code>

  ... & lt; ParentNode parentAttr1 = "Parent Entry 1 Value" & gt; & Lt; ABC anAttr = "One Value" /> & Lt; Def someAttr = "some value" /> & Lt; / ParentNode & gt; ...   

Is there any way to insert another brother element between existing hair elements, so that the final structure looks like this ??

  ... & lt; ParentNode parentAttr1 = "Parental Entry 1 Value" & gt; & Lt; ABC anAttr = "One Value" /> & Lt; Gi etr = "one more value yet" /> & Lt; Def someAttr = "some value" /> & Lt; / ParentNode & gt; ...   

I have not found any way Do this through tools I have to add a custom action that holds the elements where I want them, and after that the installer adds to me the details which I consider great, but still work , And uninstalls with it, though it leaves empty elements in place.

No comments:

Post a Comment