TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ValoChele
NA
68
21.6k
Need help in making xml link node modification?
Nov 8 2017 11:55 AM
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!!
Reply
Answers (
2
)
Writing A C# Program
Generate digital signature in PDF and verify the certificate