0

Suppose I have something like this:

<Program>
    <versionName>client</versionName>
    <shortcutName>Shortcut to versionName</shortcutName>
</Program>

Except when I read it in C# it should say "Shortcut to client" but it instead says "Shortcut to versionName". I tried using

<shortcutName>Shortcut to <versionName>client</versionName></shortcutName>

but that didn't work.

Av1541
  • 47
  • 4

1 Answers1

0

You can reference one element from another via id and idref attributes, but that's not going to give the sort of substitution effect you're describing. See Can I use variables in XML files? for how to use entity references as a form of variable binding for about as close as you can get without writing code to achieve the reference/substitution effect you seek.

kjhughes
  • 106,133
  • 27
  • 181
  • 240