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
Darshan Kshirasagar
NA
22
3.1k
Xml with multple element split
Nov 2 2016 8:31 AM
Below is my XML string :<br /> <br /> <Header><br /> <Fr><br /> <Id><br /> <Fin><br /> <Clr><br /> <MId>002</MId><br /> </Clr><br /> </Fin><br /> </Id><br /> </Fr><br /> <To><br /> <Id><br /> <Fin><br /> <Clr><br /> <MId>025</MId><br /> </Clr><br /> </Fin><br /> </Id><br /> </To><br /> <Msgid>93734</Msgid><br /> </Header><br /> <Body><br /> <F1><br /> <GH><br /> <A>KANG201611021631893734</A><br /> <B>2016-11-02T04:11:52</B><br /> <C>1</C><br /> <D Ccy = "INR">2500.00</D><br /> <E>2016-11-02</E><br /> </GH><br /> <CD><br /> <P><br /> <E1>/XUTR/KANGH16307631893734</E1><br /> <T1>KANGR520161102631893734</T1><br /> </P><br /> <P2><br /> <I1>HIGH</I1><br /> <S1><br /> <P2>asd</P2><br /> </S1><br /> <L1><br /> <P4>werwer</P4><br /> </L1><br /> <C6><br /> <cc>100</cc><br /> </C6><br /> </P2><br /> </CD><br /> </F1><br /> </Body><br /> <br /> <br /> In this XML Multiple elements like "Header" and "Body"<br /> i want to split this single string to two as separate Header and Body .<br /> <br /> <strong>What I have tried:</strong><br /> <br /> string xml = "<root>" + messageStream + "</root>";<br /> XDocument doc = XDocument.Parse(xml); <br /> //String status = doc.Root.Element("Header").Value;
Reply
Answers (
2
)
About Form Design
Connection string