I have some xml files which contains nodes like
- <disp-formula id="deqn1">...disp-formula>
- <disp-formula id="deqn2-5">...disp-formula>
- <disp-formula id="deqn6-9">...disp-formula>
- <disp-formula id="deqn10">...disp-formula>
along with other nodes in the file. Also the file has link nodes related to the above nodes like
- <xref ref-type="disp-formula" rid="deqn1">...xref>
- <xref ref-type="disp-formula" rid="deqn3">...xref>
- <xref ref-type="disp-formula" rid="deqn8">...xref>
I'm trying to modify those link nodes <xref ref-type="disp-formula" rid="deqn3">...xref> to <xref ref-type="disp-formula" rid="deqn2-5">...xref>, <xref ref-type="disp-formula" rid="deqn8">...xref> to <xref ref-type="disp-formula" rid="deqn6-9">...xref>
and so on, as there are no such thing as id="deqn3", id="deqn8"
in the file and attribute values like deqn3, deqn8 fall in the range of the attributes <disp-formula id="deqn2-5"> and <disp-formula id="deqn6-9">
that is why there are replaced by their respective id's.
How do I do this using LINQ to xml?
I dont even know where to start and how do I structure the procedures required?
Please help!!