Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Using XLinq to manipulate an XML Document, XLinq U Rock
travislaborde
follow
2
5-2-2008 7:40 AM
303 views
tags:
programming
,
.net
,
2008
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Related Clips
Goodbye To Faulty Software?
Harvard Researchers Create Computer Langua...
ComCast Hears You and Talks Back
Sophia
Creative Code: 14 Ways to Learn From Creat...
FOSSwiki
FreeBookZone - free eBooks
More clips from
travislaborde
Talula Does The Hula From Hawaii
Japanese iPhones Get Exclusive Feature to...
Unit Test Boundaries
Today's Top Clips
High Speed Photography
Hero
Jupiter
Time - as an abstract idea –beautiful illustration
California becomes first state to ban trans fats
Solar Sailing in Space
The CO2 extractor
"Time" - Wheel of Life
Aboriginal Rock Art at Risk
Do Not Read This !
visit the
Top Clips page
View the Top Clips from
May 2, 2008
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://www.clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/73456a6d-6bc9-4dc8-b2a4-069956040ad4/A02B1228-8256-4473-BD6D-1B855CEA20FB/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/01/using-xlinq-to-manipulate-an-xml-document-xlinq-u-rock.aspx" href="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/01/using-xlinq-to-manipulate-an-xml-document-xlinq-u-rock.aspx" style="font-size: 11px;">devlicio.us</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/01/using-xlinq-to-manipulate-an-xml-document-xlinq-u-rock.aspx"><H4 class="BlogPostHeader">Using XLinq to manipulate an XML Document, XLinq U Rock </H4></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/01/using-xlinq-to-manipulate-an-xml-document-xlinq-u-rock.aspx"><P>Here is the Raw XML that needed to be modified</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/01/using-xlinq-to-manipulate-an-xml-document-xlinq-u-rock.aspx"><P><?xml version="1.0" encoding="utf-8" ?> <BR /><root> <BR /> <authorization> <BR /> <username></username> <BR /> <password></password> <BR /> </authorization> <BR /> <call> <BR /> <call_name></call_name> <BR /> <call_action></call_action> <BR /> <search_type></search_type> <BR /> <search_value></search_value> <BR /> <search_value2></search_value2> <BR /> </root> <BR /></root></P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://devlicio.us/blogs/derik_whittaker/archive/2008/05/01/using-xlinq-to-manipulate-an-xml-document-xlinq-u-rock.aspx"><LI class=""><SPAN><SPAN class="comment">// Convert to an XDoc so we can process this</SPAN><SPAN> </SPAN></SPAN></LI><LI class="alt"><SPAN> XDocument xDocument = XDocument.Parse( xmlDocument.OuterXml ); </SPAN></LI><LI class=""><SPAN> </SPAN></LI><LI class="alt"><SPAN> XElement authorizationElement = xDocument.Element( root<SPAN class="string">" ).Element( "</SPAN><SPAN>authorization</SPAN><SPAN class="string">" );</SPAN> </SPAN></LI><LI class=""><SPAN><SPAN class="string"> authorizationElement.SetElementValue( "</SPAN><SPAN>username</SPAN><SPAN class="string">", "</SPAN><SPAN>SomeValue</SPAN><SPAN class="string">" );</SPAN> </SPAN></LI><LI class="alt"><SPAN><SPAN class="string"> authorizationElement.SetElementValue( "</SPAN><SPAN>password</SPAN><SPAN class="string">", "</SPAN><SPAN>SomeValue</SPAN><SPAN class="string">" );</SPAN></SPAN></LI></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/A02B1228-8256-4473-BD6D-1B855CEA20FB/blog/" title="blog or email this clip"><img src="http://content8.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Blog
Copyright
Privacy
EULA
OK