Why can't I get past the first three attributes?

I have the following small XML file, where I store my program settings:
 
<Prager>
  <CannedText tTextTitle1="Fast Shipping!" tCannedDesc1="Still in manufacturer wrapping! Fast Shipping! Ships within 24 hours!  100% Satisfaction guaranteed!" tTextTitle2="Repl w/ title" tCannedDesc2="" tTextTitle3="Repl w/ title" tCannedDesc3="" tTextTitle4="Repl w/ title" tCannedDesc4="" tTextTitle5="Repl w/ title" tCannedDesc5="" tTextTitle6="Repl w/ title" tCannedDesc6="" tTextTitle7="Repl w/ title" tCannedDesc7="" tTextTitle8="Repl w/ title" tCannedDesc8="" tTextTitle9="Repl w/ title" tCannedDesc9="" tTextTitle10="Repl w/ title" tCannedDesc10="" tTextTitle11="Repl w/ title" tCannedDesc11="" tTextTitle12="Repl w/ title" tCannedDesc12="" tTextTitle13="Repl w/ title" tCannedDesc13="" tTextTitle14="Repl w/ title" tCannedDesc14="" tTextTitle15="Repl w/ title" tCannedDesc15="" tTextTitle16="Repl w/ title" tCannedDesc16="" tTextTitle17="Repl w/ title" tCannedDesc17="" tTextTitle18="Repl w/ title" tCannedDesc18="" />
  <ProgramOptions oAutoPricing="false" oVerifyDeletes="true" oBackupDB="true" oAutoSKU="true" oWarnNoCat="false" oWarnNoLoc="false" oGenCustNbr="true" oGenInvNbr="true" oAutoFileRetn="true" oToolTipsOff="true" oStartPanelSearch="false" oCurrEnglish="false" oCurrEuro="false" oCurrUS="false" oMoveAvgPrice="false" oMoveLowPrice="false" oUseAWS="true" oNoDesc="false" oAWSKey="084BT0EPNB27A07DGR82" oAWSSecretKey="Gk0QGlcORtiSZQxqGiifKyiarqmyf9jcS1U/5Eyw" oAZAssocTag="pragbook-20" oMerchantID="A20V78MULJSCYR" oMarketplaceID="ATVPDKIKX0DER" oHalfDotComToken="AgAAAA**AQAAAA**aAAAAA**uYiHRw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnYuhDpaLoAmdj6x9nY+seQ**DAsAAA**AAMAAA**y9/8TcAmm8gCijqwhSxxWsHg3QjnRqpzB+LbUldfNMOvWQVUPHSoPEYFPa0QXm/Ekgg5cUvKg8RRxHC3swHT+RSG6w144BcSbc4GjPdJ7Z7oOO84qwUJwb1Ufxk9dqSxxpusnSmqjF8vxDsD7ovqzAaRsqhZGhriy8ZeuymnnHW5pufSvMD9ZAM/MgdlJ45NM3O+eQPXuez2gh4oHraTx1R0Akg4RtKzxgjQl4lLfp3r9IGM0lh2ZP56PnYfdDAMdKAbcIyPo3tN86tCCqZabWNZuRY5UQDaQbBEySyLb0/FUGzwq9AhMSxAKI0hX0wZK//PTuKFUoZIDrIDYT21Bj7bUqGo9OAnMV2NSkA+Zivchd3vCDrHE+Ebi0CoFKa2aGksnE7pXMjVC3NeGC3TIE5vKf7AnpqCBbDJe+SpQSXU+aIxPgkaU7GAUH+kn2ONJZO77BKxIR75/nB+vw/LIUZAKOI8TH1c3NvXxLszm3Sed+x4dE6nyPlNAR+BypaWgPpwqU2x6HEZjYb/WYC9SNWDmNkZJUi/xluAiagZvi4eDG+JwGxsEbw6/dHGCQ3rrk1e2NZNdiEwVtPOqlx/f99HM1Gd34AUf08yA+t9ztapul+nzAdsna4V4zdIrYmjAbXeaaYkTNpMDQzxOIvmWLcAXjXI1AOoPQHUSRTh3Q+fJ7DJukyRgT9AOnKd1kiLa0Z1ni0ucEH1XRYK9k7zLnXFISCOIBro5Y4Mkl7h4MkPWMNh728zIES22QCtmW8l " oSortOverride="false" oSortAsc="false" oSortDsc="false" oAllowAddUpdate="false" oUseReceipt="false" />
  <tabSettings oUPCSeq="0" oQtySeq="0" oLocSeq="0" oSKUSeq="0" oCostSeq="0" oPriceSeq="0" oRePriceSeq="260" oTitleSeq="0" oASignedSeq="0" oPubSeq="0" oYearSeq="0" oDescSeq="0" oCannedSeq="250" oCondSeq="0" oJacketSeq="345" oEdSeq="353" oTypeSeq="355" />
  <UploadSelections uAmazon="false" uAmazonUK="false" uAlibris="false" uBandN="false" uPapaMedia="false" uScribblemonger="false" uHalfDotCom="false" uChrislands="false" uCS1="false" uCS2="false" uCS3="false" uCS4="false" />
  <ExportSelections xAlibris="true" xAmazon="true" xBarnes="true" xChrislands="true" xHalf="true" xPapaMedia="true" />
  <RepricingSelections highByAmt="" whatPriceH="-1" lowByAmt="" whatPriceL="-1" newByAmt="" newWhatPrice="-1" condAmtVG="" condAmtG="" condAmtP="" belowMyCostOr="" discardBelowAmt="" discardAboveAmt="" priceLowPct="false" greaterSugg="true" lessSugg="true" highBelow="false" priceHighPct="false" lowBelow="false" dontGoBelowCost="false" priceNewPct="false" />
  <Miscellaneous mPictureFilename="" mBusinessAddress="Logo goes above; place your address here.  Maximum of 64 characters on two lines." mReceiptWidth="" mStoreName="" />
  <CustomSites customSite1="Custom Site 1" customSite2="Custom Site 2" customSite3="Custom Site 3" customSite4="Custom Site 4" />
</Prager>

Open in new window


I access them, in order, with this code snippet:
 
if (File.Exists(xmlFilename)) {
	using (XmlReader tr = XmlReader.Create(xmlFilename)) {
		try {
			while (tr.Read())  // If the node has value 
			{
				if (tr.IsStartElement("CannedText")) {
					if (tr.GetAttribute("tTextTitle1").Contains("Repl w/ title") == false) {
						tbCannedTitle1.Text = tr.GetAttribute("tTextTitle1");
						tbCannedDesc1.Text = tr.GetAttribute("tCannedDesc1");
						lbCannedText.Items.Add(tbCannedTitle1.Text);
					}
					if (tr.GetAttribute("tTextTitle2").Contains("Repl w/ title") == false) {
						tbCannedTitle2.Text = tr.GetAttribute("tTextTitle2");
						tbCannedDesc2.Text = tr.GetAttribute("tCannedDesc2");
						lbCannedText.Items.Add(tbCannedTitle2.Text);
					}
				}

				if (tr.IsStartElement("ProgramOptions")) {
					if (tr.GetAttribute("oAutoPricing") == "true")
						cbAutoPricingLookup.Checked = true;
					else cbAutoPricingLookup.Checked = false;

					if (tr.GetAttribute("oVerifyDeletes") == "true")
						cbVerifyDeletes.Checked = true;
					else cbVerifyDeletes.Checked = false;
				}
				
				 if (tr.IsStartElement("tabSettings")) {
					if (tr.GetAttribute("oUPCSeq").Length > 0)
						tbUPC.TabIndex = Convert.ToInt32(tr.GetAttribute("oUPCSeq"));
					if (tr.GetAttribute("oQtySeq").Length > 0)
						tbQty.TabIndex = Convert.ToInt32(tr.GetAttribute("oQtySeq"));
				}
				
				 if (tr.IsStartElement("UploadSelections")) {
					if (tr.GetAttribute("uAmazon") == "true" && tbMarketplaceID.Text.Length > 0 && tbMerchantID.Text.Length > 0)
						cbUploadAmazon.Checked = true;
					else
						cbUploadAmazon.Checked = false;

					if (tr.GetAttribute("uAmazonUK") == "true" && tbAWSKey.Text.Length > 0 && tbAWSSecretKey.Text.Length > 0)
						cbUploadAmazonUK.Checked = true;
					else
						cbUploadAmazonUK.Checked = false;
				}

Open in new window


The problem is that the code will not process any of the items past "tabSettings".

How do I fix this?
rmmarshAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
What do you mean by, " the code will not process any of the items past 'tabSettings'"? I tested your code in a new project, and it seemed to process correctly. UploadSelections was retrieved as expected.
0
rmmarshAuthor Commented:
GREAT!  I didn't want to hear that! :D

When I put debug breakpoints on each of the lines that checks for the Start Element (lines 6, 19, 29 and 36).  only the first three stop... the remainder are ignored (there are more than what I show).
0
rmmarshAuthor Commented:
Do you want to see the complete code?
0
käµfm³d 👽Commented:
...and that is the exact XML you are using when you encounter that breakpoint behavior?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rmmarshAuthor Commented:
Hi Kenneth... I found it... it's a pilot error on my part... there is an exception when processing the "tab settings" attributes.

Thanks for your help...

Rolf (Spokane-Dude)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.