present attributes instead of a name

Hello ,
Here is the code of the function I want to use:

private TreeNode CreateTreeNodeFromXmlNode(XmlNode node)
		{
			TreeNode tmptreenode = new TreeNode();

			if((node.HasChildNodes) && (node.FirstChild.Value != null))
			{
				tmptreenode = new TreeNode(node.Name);
				TreeNode tmptreenode2 = new TreeNode(node.FirstChild.Value);
				tmptreenode.Nodes.Add(tmptreenode2);
			}
			else if(node.NodeType != XmlNodeType.CDATA) 
			{
				tmptreenode = new TreeNode(node.Name);
				
			}

			return tmptreenode;
		}
The problem is that insted of node.Name I want node.Attributes["name"]
to be presented and not really understan how can I do it.(It is not
going through compilation if I use the node.Attributes["name"])
Can someone help me?
Thank you


*** Sent via Developersdex http://www.developersdex.com ***
0
juli8024 (19)
4/4/2005 12:34:16 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
397 Views

Similar Articles

[PageSpeed] 50

node.Attributes["name"].Value


-- 
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx



"juli jul" <juli8024@yahoo.com> wrote in message 
news:OdMseKROFHA.2468@tk2msftngp13.phx.gbl...
>
> Hello ,
> Here is the code of the function I want to use:
>
> private TreeNode CreateTreeNodeFromXmlNode(XmlNode node)
> {
> TreeNode tmptreenode = new TreeNode();
>
> if((node.HasChildNodes) && (node.FirstChild.Value != null))
> {
> tmptreenode = new TreeNode(node.Name);
> TreeNode tmptreenode2 = new TreeNode(node.FirstChild.Value);
> tmptreenode.Nodes.Add(tmptreenode2);
> }
> else if(node.NodeType != XmlNodeType.CDATA)
> {
> tmptreenode = new TreeNode(node.Name);
>
> }
>
> return tmptreenode;
> }
> The problem is that insted of node.Name I want node.Attributes["name"]
> to be presented and not really understan how can I do it.(It is not
> going through compilation if I use the node.Attributes["name"])
> Can someone help me?
> Thank you
>
>
> *** Sent via Developersdex http://www.developersdex.com *** 


0
info8687 (7)
4/5/2005 1:15:10 AM
Reply:

Similar Artilces:

#NAME #2
I have a UDF that takes an argument: Function func( Optional s1 As String ) If s1 = "A" Then func = 10 Else func = 20 End If End Function In a workbook, A B 1 A =ROUND(func(A1)/10, 2) The value in B1 is 1.00. I saved the workbook, and re-opened in automatic calculation mode. As soon as I changed the content of A1 to B, value in B1 was changed to #NAME. Anyone knows why? Teresa If you changed the name of the function in the function itself on in B1 you would get a not found error or #NAME? If you placed the code somewhere else th...

VBA function to define name in a worksheet
I'm looking for a way to use a VB function to define a named range and alter the quantity of cells within the named range. I recorded a macro defining a named range from the "Insert" menu so I could get the VB code. Running a Sub using this code works fine, but I need to run it by calling a function. Below is what I've done. The Sub selectRange_SpareCopy achieves the result I want to get from the function, so I included it as an example. Function selectRange(rangeName, sheet_RowColumn) 'Called by the selectSheetRange Sub ActiveWorkbook.Names.Add Name:=&q...

Highlight the cell/row if particular name comes..
Hi, This is what I would like to achieve, There will be sheet full of address details and in that I want to highlight the cells with some colour if the particular list(i.e.list of 10 particular area names like Area1,Area2....Area10) of area names present along with the door # and Street name. The challenge is that the area names will be mixed with street name ect., in the same cell. I can guess that this is possible with macro but my knowledge in that is ZERO.. Pls help on this... Can you give us some examples of what your data looks like, and details of what columns you...

Edit a column of names
Hi I have a worksheet with about 300 names in a column The names are laid out like Adrain Mr R. or Buchanan Mr & Mrs T. etc etc Is there some way to remove the titles and just leave the Surname without have to do it a line at-a-time? Martin ���� Martin, In your worksheet, make sure you have blank columns to the right of the column that contains the names. Highlight the names. Click the "Data" menu item. Click "Text to Columns...". In the pup-up wizard, select the type of data as "Delimited". Click the "Next" button. Remove the check mark fro...

How to delete all defined names from a workbook?
Hello How to delete all defined names from a workbook? The Name manager add in is very useful... http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.htm Use the Name manager by Jan Karel Pieterse. You download it here: http://www.jkp-ads.com/Download.htm -- Kind regards, Niek Otten "Dmitry Kopnichev" <kopn@bk.ruDelete> wrote in message news:%23fyV1Js5FHA.2576@TK2MSFTNGP09.phx.gbl... > Hello > How to delete all defined names from a workbook? > > Thank you! "sfby" <pnc1962-groups@yahoo.co.uk> ???????/???????? ? ???????? ?????????: news:113171...

Credit Card
Is it an RMS function or ISO/Vital to get the name of the customer on the receipt. The masked number shows up with all information and signature line, but not the name of the card holder. Any help on this matter would be greatly appreciated, M ...

Hiding Attributes
Hi CRMers, How do I hide or make an attibute invisible? Thanks, Dixon Hi, The following JavaScript in the Form on which you wish to hide "attributes" will hide the "customerid" attribute's controls: crmForm.document.getElementById('customerid_d').style.display = "none"; crmForm.document.getElementById('customerid_c').style.display = "none"; Hope this helps! -Ernst Dix wrote: > Hi CRMers, > > How do I hide or make an attibute invisible? > > Thanks, > Dixon ...

Returning a named range source reference
Using XL03 I am using the code below, trying to create a list of named ranges and their source references. I'm having two problems. (1) There are some other names (named objects) in the workbook, and I don't want to return those; I just want to return named ranges, and (2) The code below returns the resulting range referred to, but not the source reference. For example, if the named range is "=offset(A1,1,1)" then I need to see that offset statement, not the resulting range of "B2". I tried everything that made sense from the help object model und...

file names and path. How text to columns from right to left
I have an export file that is a list of file names Some times the name is 3 deep sometimes more: O:\Shared\700 Club\700 Club Information.doc O:\Shared\Accounting-IT\Invoices\Pack America\Pack America - Glen Tyler.doc I am need to get these in columns so that the file names all line up. So...I need to delimited starting from the right with the \ as the deliminator. My data is in column A. I would probably start 10 columns over pasting the first data (file name) as I do not know how deep the deepest file path is. Is there a way to do this??? Your description is not completely c...

Named-range source-data for pie charts on copied worksheets
I have to finally concede that I'm stuck and have to ask for advice. I am using Excel 2000 and have been able to use Andy Pope's help on "Automatic removal of zero values in pie chart". That works fine. But if I copy the worksheet, the pie chart on the copied (new) worksheet references the named range as defined on the original worksheet. My named ranges, which the pie chart references, are: PieLabels=OFFSET(blank!$O$26,0,0,COUNT(blank!$N$26:$N$34),1) PieValues=OFFSET(blank!$N$26,0,0,COUNT(blank!$N$26:$N$34),1) So, one solution might be to define the same named range on dif...

VBA code to run macro in certain file based on name of file in cel
I am trying to come up with code that will run a macro in a workbook where the path and name of the workbook are in a cell reference. I have tried the following with no luck. The path to the file is located in cell F36 of worksheet, "Customize" and the name of the file is located in cell F42. The name of the macro is "ClearTotalSavings". Any help from one of you gurus would sure be appreciated. Application.Run "'" & Workbooks(Sheets("Customize").Range("F36").Value) & "\" & Sheets("Customize").R...

can I use a template from publisher for a powerpoint presentation
I want to use the Layers template in Publisher for a Powerpoint presentation so that the look of my company stays consistent. Any suggestions how to do this? You can copy/paste the objects. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "KHiemstra" <KHiemstra@discussions.microsoft.com> wrote in message news:20565D6D-4608-4E55-8251-593DE51CB7D0@microsoft.com... >I want to use the Layers template in Publisher for a Powerpoint presentation > so that the look of my company stays consistent. Any suggestions how to ...

see only name in the "from" field composing emails
When sending an email, how do you show your name only in the from field as opposed to your name and email address? I noticed whe I watched the the "outlook" demo that the example email that is being composed shows the senders name only, how do I make that change? If you create a Contact Record for yourself and change the Email Display As field to contain your name only, that's what you'll see in the To: field. You won't be accomplishing anything, but if it makes you feel better, go for it. What the recipient sees will be determined by their email software a...

The Pivot Table field name is not valid,
I am receiving the above error message, but don't understand why. My data is in columns, organised as a list and the columns are labelled. What do I have to do to get over this? Thanks Denise Maybe there's a hidden column, with no heading text, or you've accidentally included a blank column at the end of the range. deniseh wrote: > I am receiving the above error message, but don't understand why. My data is > in columns, organised as a list and the columns are labelled. What do I have > to do to get over this? > Thanks > Denise -- Debra Dalgleish Ex...

default domain name on email address needs to be changed
Hey, SBS 4.5 on NT 4.0 SP6a (Exchange 5.5 SP4) Had to rebuild an SBS machine, install this software for the first time, and had backed up the public and private information stores before doing so. As this is a small company it was easy enough to get the users to backup their mailboxes as pst files also, just in case. Computer name for SBS is XXX in a domain called YYY, so whenever I create a new mailbox, the default email address comes out as user@XXX.YYY.com, but the company name is ZZZ so all email addresses should be (and were, on the old SBS) user@ZZZ.com.au . Can this be changed after i...

Parse a path for a file name in Access
Hi All, How do I parse a file path in Access for return the file name? Example c:\somefolder\somefolder\somefolder\somefolder\somefolder\somefolder\somefolder\someFile.xls I want to query a table with this value and just return 'someFile.xls" no matter how long or short the path is. I can do this in SQL Server, but i am new to Access SQL and I can not figure it quite out. Any help is always appreciated. Cheers, ~ck On Wed, 06 Feb 2008 20:23:34 GMT, CK wrote: > Hi All, > How do I parse a file path in Access for return the file name? > Example > c:\somefolder\somefol...

Repeated request to enter user name and psw for pop3 account
Hi, Outlook asks me repeatedly to enter user name and psw for my pop3 account on pop.mail.yahoo.com I verified the user name and psw on Yahoo webmail and reentered the username and psw into outlook/email accounts. Still, every time it does send/receive, the window "Enter Network Password" pops up... Vista home premium SP1, office 2007 SP2 Thank you for your help. On 12/29/2009 10:46 AM, Erik wrote: > Hi, > Outlook asks me repeatedly to enter user name and psw for my pop3 > account on pop.mail.yahoo.com > I verified the user name and psw on Yahoo web...

Re:Delete names in address book
How do you delete an email address and contact you longer want in the address book? To which address book are you referring? Outlook does not use address books. You would delete said Contact from the Contacts Folder. -- Russ Valentine [MVP-Outlook] "Sandy" <anonymous@discussions.microsoft.com> wrote in message news:005401c3fa5f$dc96bfd0$a101280a@phx.gbl... > How do you delete an email address and contact you longer > want in the address book? ...

Refer to a named range
Hi XL2003 I am having trouble using a named range in a macro, even after refering the Help. The named range lives in the active workbook on another sheet. My code is this: Private Sub Worksheet_Activate() With [CompNames] Set c = .Find(Range("A1")) If Not c Is Nothing Then A = Sheets("Names").Cells(c.Row, 3) End With If ActiveSheet.Name <> A Then ActiveSheet.Name = A End Sub You will see that I have had to resort to using [ ] around the named range, which is the only way I could get the code to run. I tried Range("...

roundtripping and xmlns attributes
I am endeavouring to use .NET v2.0 XML facilities to "roundtrip" reading and writing XML documents - i.e. to end up with _exactly_ what I started with, but I can't seem to figure out how to get an XMLReader to report "xmlns" attributes. It seems to report an "xmlns='MyDefaultURI'" with incorrect data, and doesn't appear to report "xmlns:myprefix="MyPrefixURI" prefix declarations at all. Yes, I know that it correctly processes and resolves namespaces and prefixes etc, but I want to be able to accurately report the...

Change Chart Name Event
1) Is there a way to execute code whenever the chart name (on the tab) changes? There is no AfterUpdate event for charts. How do I do this? 2) Also, is there any way to reference a chart name in a formula on a worksheet? I want to create a list of all sheets (including charts) in the workbook and the user can choose which sheets to publish. I want the list to be dynamic so if the user changes the name on the tab it is automatically reflected in the list. I can do this for regula worksheets but haven't found a way to do it for charts. 3) If I have a data sheet and a chart tied ...

How can I change to inches instead of pixels in Picture Manager?
I'm trying to size a huge pile of photos in MS Office Picture Manager, and I need to have the sizing in inches, not pixels. But I can't seem to find a way to change that setting. Is it possible, and if so, how and where? Thanks!!! "donnalee1966" <donnalee1966@discussions.microsoft.com> wrote in message news:3446B8A9-56D0-4F9A-88D0-8C743E7A2B7E@microsoft.com... > I'm trying to size a huge pile of photos in MS Office Picture Manager, and > I > need to have the sizing in inches, not pixels. But I can't seem to find a > way > to ...

sort address book by last name??
where is the switch that changes the address book from first name sort to last name sort? It's different in every version of Outlook. That's why it's a good idea to post your version so someone can answer. -- Russ Valentine [MVP-Outlook] "roger" <pulkr004@tc.umn.edu> wrote in message news:01e501c3b785$0c409bc0$a101280a@phx.gbl... > where is the switch that changes the address book from > first name sort to last name sort? ...

Automatically adding unwanted name to email
Hi I'm using Office 2k. Everytime I reply to an email and press return to start a new paragraph outlook assumes its the end of the message and adds my name. Problem is I got married recently so its not correct. I'd like to stop it happening all together. I've searched till I'm blue in the face and changed any entries to my married name but still it persists. Would some kind person point me in the right direction please??? TIA tools, options, email options, disable mark my comments with. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24...

_xlfn.IFERROR = #NAME? in Advanced Name Manager
I keep getting a "formula can't calculate" error in one of my workbooks. The only problem is every formula is calculating correctly. When using Advanced Name Manager, I'm able to see a named range that looks like _xlfn.IFERROR with a value of = #NAME? It's not visible with Excel's native name manager. A little research turned up this article: http://office.microsoft.com/en-us/excel/HA102045691033.aspx which states if you will get this error when using 2007 formulas in older version BUT, I'm using 2007. I'm at a loss on how to go about tackling this prob...