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
How to get the contents between two same nodes?
Mar 8 2018 9:23 AM
How do I get the contents between two nodes (under the same parent node) as a string...for example, assume there is a xml file as
<xml
version
=
"1.0"
?>
<
main
>
<
abc
>
This is
<
day
>
1
day
>
the
<
day
>
5
day
>
th
<
month
>
November
month
>
<
year
>
1993
year
><
abc
>
<
xyz
>
It does not matter what
<
day
>
10
day
>
it is
<
day
>
3
day
> of
<
day
>
19
day
><
xyz
>
<main
>
How do I get the contents between the first
node and the next
node under a any given parent nodes?. i.e. the output should give the results
" the ", "
it is
"
and
"
of
".
I think it's gonna look something similar to
var nodes = Doc.DescendantNodes().OfType<XText>().Select(a=>a.Value)
but I cannot figure exactly how?
Can someone help...?
Reply
Answers (
3
)
I have nested structure kind of class file
How to get all Invalid cross references from word using c#.