convert XElement childnodes of an xelement node to a List<Xelemen

I have 
XElement parentcore
I have 
    List<XElement> childrenCore = new List<XElement>();

I  add this list as childelemens to the XElement name "parentcore".

I then want to derive the childelements from XElement and convert them back 
to the list "childrencore". Is there a one liner to convert all childelements 
to the List childrenCore?
thanks
Markus

0
2/17/2009 10:30:01 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
1082 Views

Similar Articles

[PageSpeed] 8

Markus Ohlenroth wrote:
> I have 
> XElement parentcore
> I have 
>     List<XElement> childrenCore = new List<XElement>();
> 
> I  add this list as childelemens to the XElement name "parentcore".
> 
> I then want to derive the childelements from XElement and convert them back 
> to the list "childrencore". Is there a one liner to convert all childelements 
> to the List childrenCore?

   parentcore.Elements().ToList()

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
2/17/2009 11:49:30 AM
Reply:

Similar Artilces:

Compare entries in 2 worksheets and list what does not match
Good Day All; I have 2 Excell works sheets with approx 14000 rows each. What I would like to do is compare both lists and get a 3rd list that shows what entries do not match. Is there a simple way to do ythis in Excel Thanks All Chomp Assuming A1 should equal A1 in the other sheet... =IF(Sheet1!A1=Sheet2!A1,"",Sheet!A1&" does not match "&Sheet2!A1) Auto-Filter for non-blanks. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "The Chomp" wrote: > Good Day All; > > I have 2 ...

Outlook 2003 Imap Auto Purge wish list
I hope someone at Microsoft can code in a auto purge Imap deleted email function into there next Service Pack. I can see a problem rolling this out to our employees. There going to delete messages and those messages are going to stay on the Email server until they do a Purge. I'm afraid they just won't do this. We use Imap. No auto purge means emails staying on the server which over time just takes up hard drive space and makes tape backups take longer. wayne Hi Wayne, You should send suggestions to mswish@microsoft.com as the newsgroups are not monitored for feature request...

Categories deleted converting from Quicken
Hi folks, I just converted from Q2003 Premier to the Money 2005 Trial 2 days ago. I noticed today that a number of categories have been removed from the transactions in my checking account and credit card accounts. What I've noticed so far: 1. All sub-accounts for Utilities were gone. This wasn't too bad because I could use find replace since the payee name has been the same on these for all years I have in Quicken/Money. 2. All sub-accounts under Insurance were gone. 3. The category Groceries came over, but there were no transactions in it. Quicken had several hundred...

Convert Double Space To Single Space
How do you convert double spaced text to single spaced? I don't see an option for this in Outlook. I can paste into Notepad, copy and then paste into Outlook, but I would prefer a way to do it within Outlook. ...

Converting Money 2000 Canadian to Money 2006 Canadian
Hi, Can anyone confirm that such a conversion is possible? I was hoping to convert to Money 2007 but was unsuccessful. I'll live with Money 2006 Canadian but I want to ensure the conversion is possible first. I don't want to drop the money on it to find out it doesn't work. Thanks in advance, In microsoft.public.money, smurfgun wrote: > >Can anyone confirm that such a conversion is possible? I was hoping to >convert to Money 2007 but was unsuccessful. I'll live with Money 2006 >Canadian but I want to ensure the conversion is possible first. I don'...

Windows Update Office 2007 Converter confusion
On my desktop I have Office 2003 (laptop has Office 2007). I recently received an attachment in .docx format (2007). I downloaded the converter to my desktop and opened the document. Now on my desktop (which has Office 2003) I receive update notices for Office 2007. Should I ignore these? Hide them? Install them? Will I still be notified re updates needed for Office 2003? Thank you for whatever insight you can provide. If you can give me some of the background explanation as to why this is happening (I presume related to the 2007 converter viewer install), I can understand bett...

Converting number to text
Is it possible to convert, say 1234 to one thousand two hundred and thirty four Thanks There is no direct functions to convert this. For a VBA solution check out the below links http://www.ozgrid.com/VBA/ValueToWords.htm http://support.microsoft.com/kb/213360 http://www.xldynamic.com/source/xld.xlFAQ0004.html -- Jacob (MVP - Excel) "booshi" wrote: > Is it possible to convert, say 1234 to one thousand two hundred and thirty > four > > > Thanks > > > . > ...

grayscale autoshape changes to color when converting to PDF
When converting from Microsoft Publisher 2007 to Adobe Acrobat 8.0 PDF, the autoshape picture that we changed to grayscale changes back to color when reviewing the created PDF. Are you setting Acrobat to print in black and white? Select the PDF printer, properties, paper/quality tab. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "CDJ" <CDJ@discussions.microsoft.com> wrote in message news:6BE9EE01-97DB-4AB6-BD9C-25E27E0BB68D@microsoft.com... > When converting from Microsoft Publisher 2007 to Adobe Acrobat 8.0 P...

Converting a MFC DLL to a regular DLL
Hi, I have an MFC DLL which i have now removed the single MFC window that popped up error messages. I want to now convert it to a regular DLL. What parts of the code to i need to remove / modify? And what compiler settings need changing? On Aug 4, 6:05=A0am, hamishd <Hamish.D...@gmail.com> wrote: > Hi, I have an MFC DLL which i have now removed the single MFC window > that popped up error messages. > > I want to now convert it to a regular DLL. What parts of the code to i > need to remove / modify? And what compiler settings need changing? I would create a dummy MFC reg...

Export or convert .qrp files to HTML
Hi all, great forum - Does anyone know how to export or convert any given .qrp report into an HTML or other web format? Could it be possible to open a .qrp in it's native format? I've seen a company online (Sabletooth) that converts Report Builder (.qrp) files into Crystal, but I think they are only offering consulting services. Thanks in advance for your help. At the top of the report it gives you several options(print, save, etc.) the fourth or fifth from the left(not quite sure which one by memory)is the one to export. It gives you several options. One of which is to expo...

Converting from Lotus 1, 2, 3 docs
I have a user who has a bunch of Lotus 1, 2, 3 spreadsheets that he is trying to convert to Excel. His version of Lotus is old (version 5), his version of Excel is 2000 sp2. The files convert but they are missing pages or headings or other unacceptable qualities. Anyone any advice? Michael If you open the files using Excel and save them to an .xls format in the current version you are losing data? A while back I needed to do this. I wrote an application in VB that loops through the files, opens them using Excel (add a reference in VB to MS Office 10) and then save them in the current ...

how to convert a CString variable to unsigned short array one?
Hi, In my unicode VC6 app, how to convert a CString variable to unsigned short array? ....... CString strRst; unsigned short strOleChars[100]; strOleChars = strRst; //??? Thank you. Is ConvertStringToBSTR() what you are looking for? AliR. "David" <David_Wang_Xian@hotmail.com> wrote in message news:e6gbA3avFHA.720@TK2MSFTNGP15.phx.gbl... > Hi, > In my unicode VC6 app, how to convert a CString variable to unsigned short > array? > ...... > CString strRst; > unsigned short strOleChars[100]; > strOleChars = strRst; //??? > > Thank you. > > ...

Sending multiple Emails so each person does not get the list
We want to send out multiple emails to several email accounts. We dont want the accounts to see the list of accounts that the email went to. How does one do this in Outlook? In any contacts folder, Tools | Mail Merge is the best choice. --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 "tom" <Spamblocker@ameritech.net> wrote in message = ...

User list
I'm wondering how to check the users on Exchange Server 2003, I tried it on E2k3 by [PS] W:\>Get-Mailbox -server Exchange2k3, and I got nothing in the list, but when I tried to remove Exchange Server 2003, I got an error, The component "Microsoft Exchange Messaging and Collaboration Services" cannot be assigned the action "Remove" because: - One or more users currently use a mailbox store on this server. These users must be moved to a mailbox store on a different server or be mail disabled before uninstalling this server. Any idea? Thanks. I followed the instruc...

How to remove locations from the drop-down list?
My drop down list for appointment locations contains a few duplicate entries, usually because one of the duplicates contains a spelling error. How can I get rid of these false entries so that I don't always have to be super-cautious to pick the correct one? M. "Michael Moser" <michael.nospam.moser@nospam.freesurf.ch> wrote in message news:DF17B5F2-DA57-48A7-B7DD-3B5A52F2A4E6@microsoft.com... > My drop down list for appointment locations contains a few duplicate > entries, usually because one of the duplicates contains a spelling error. > How ...

Book/doc on converting XP program to work nicely on Vista?
Any good books or documentation, things I should know about what worked fine on XP that won't work on Vista, what needs to be modified in the program to get it to work nicely on Vista, umm, stuff like that? What's a better way than Journal Hooks for a program to record it's own keystrokes? Journal hooks was always problematic if other programs were running that didn't process their messages correctly, and now on Vista I hear journal hooks have been disabled. try Microsoft Application Verifier. "David Deley" <deleyd@gte.net> wrote in message news:vTqVi.1...

Distribution list #7
How do I load a distribution list into the address book under a single heading ...

Converting Minutes to Seconds
I have a list of times formated in minutes and hundredths of minutes for example 7360.50 and 8622.42. I need to be able to covert thes numbers to seconds. I am sure this is an easy formula, I just don' have the time to think it through. Thanks. PS. Just to clarify 7360.50 is the same as 2:40:30 and 8622.42 i 23:42:25 -- Message posted from http://www.ExcelForum.com I think you got it wrong, haw can 7360.50 minutes be only 2:40:30 You need to use [hh]:mm:ss as format to get all hours, otherwise get up to 24 hours However if you want it in seconds just multiply with 60 =7360.50*6...

edit a drop down list
Hello, I have 2 questions 1. for an existing drop down list, how can I add a new entry? That is, a list named "division" now contains 5 items, and I want to add a sixth. I've tried to highlight all 6 items and typing "division" into the name box, but that just jumps me to the original 5 names. I also tried highlighting the original 5 and deleting the "division" from the name box, but again no luck. 2. Can I enlarge the font on a drop down list, so it appears larger when the arrow is clicked? The font is very small at present. To change the name r...

Converting Access 97 to Access 2003 10-14-05
This is my first conversion. Can anyone offer tips on the easiest and safest way to convert a multi user database which was developed in Access 97 to Access 2003? You can try opening A2003, and before opening any database, choose: Tools | Database Utilities | Convert Database. If you run into problems, see: Converting from Access 97 to 2000, 2002 or 2003 at: http://allenbrowne.com/ser-48.html -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jane...

Customer Mailing List
Whats the best way to output the customer mailing list so that it doesn't require the entire content to be reformatted before printing out mailing labels? If exporting to a word .doc it lumps everything up in one column. Is there a better way w/out having to virtually reformat/retype all of the customers? Thanx in advance! Rich Export as a CSV, then use Mail Merge to load the fields. -- Jason Hunt Advanced Computer Systems You can use word mail merge to directly link to the database. No need to run a csv file. mt "Jason Hunt" <jhunt@advcs.ca> wrote in mess...

Quick way to convert to Text
I am looking at a quick way to convert a column of numbers to text... Any ideas? thanks Brent "Text" as in 123 is converted to one hundred and twenty three? See Bob Phillips' site. http://www.xldynamic.com/source/xld.xlFAQ0004.html Gord Dibben MS Excel MVP On Mon, 5 Feb 2007 10:19:25 -0800, "Brent" <sagemaster@mvdsl.com> wrote: >I am looking at a quick way to convert a column of numbers to text... Any >ideas? >thanks > Try copying an unused cell then highlighting the required column ans Paste Special > Add -- HTH Sandy In Perth,...

multiple pick from drop-down list
Does anyone know how to setup a drop-down type (or other type) list where I could pick multiple selections from the list and have it populate each selection in a different cell? Thanks, John Drop-downs do not lend themselves to multiple selections (what should be shown in the text area when the drop-down is not dropped down? You would probably be best off using a ListBox (it supports multiple selections). Can you give a more detailed description of what you want to do? Rick "johnrb7865" <johnrb7865@discussions.microsoft.com> wrote in message news:DD85C389-6AFC-4BC1-9...

Holiday listing
How do I get Publisher 2003 to automatically add major holidays to each month? ...

Recently used file list
Does anyone know if the size of the list can be increased from the default of 9? Thanks Tools/Options/General allows you to change the recently viewed size, but is pretty clear that the maximum is 9. >-----Original Message----- >Does anyone know if the size of the list can be increased >from the default of 9? > >Thanks >. > In xl2k and xl2002 (not sure about xl97), when you do a file|open, you'll see a History button in the left hand frame. Maybe you could use that to see more. Maria wrote: > > Does anyone know if the size of the list can be increased...