Attributes don't show up in the sequence of nodes traversed by calls to Read (or any helpers like ReadStartElement, MoveToContent, etc.). You'll have to detect when you land on FastTrack and then call GetAttribute.
-aaron > -----Original Message----- > From: The DOTNET list will be retired 7/1/02 > [mailto:[EMAIL PROTECTED]] On Behalf Of Nischal Muthana > Sent: Thursday, June 06, 2002 5:45 PM > To: [EMAIL PROTECTED] > Subject: [DOTNET] XMLTextReader childNodes > > Hello All > > I have an xml like the following > > <ProductType> > <FastTrack condition="Equals"> > <Code1>Bye</Code1> > <Code2>Bye Bye</Code2> > </FastTrack> > </ProductType> > <Property> > <FastTrack condition="NotEquals"> > <Code1>Hello</Code1> > <Code2>Hi</Code2> > </FastTrack> > </Property> > > I am using the XMLTextReader to read the file. I want > to get the @condition attribute and do a check and > thereby get and thereby get the Code1 and Code2 of > both the <ProductType> and <Property> > > Can someone help me. > > Thanks > Nischal > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.