Avatar of Fordraiders
Fordraiders
Flag for United States of America asked on

xpath for next set of records in navigation

xml: Using Webscraper called " Data Miner"

I'm trying to get syntax correct for xpath to automatically navigate to next page.

It is asking me for   "Next Page Element Xpath:"

trying to use this below but it is not working: keeps saying it cant find element

//a[@class='page_numbers']/following-sibling::a[1]


<div class="col-md-12 no-padding pagination-container">
	
		
			<div class="ref-pagination col-md-8 col-lg-9 no-padding pull-right">
				<ul class="pagination pull-right">
					<li class="first">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span>First</span>
								</a>
							
							
						</li>
					<li class="prev">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span><</span>
								</a>
							
							
						</li>

					
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=1"><strong>1</strong><span
								class="hidden">1</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=2"><strong>2</strong><span
								class="hidden">2</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=3"><strong>3</strong><span
								class="hidden">3</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=4"><strong>4</strong><span
								class="hidden">4</span></a></li>
						
					
						<li class="page_numbers"><a
							href="NextRecordsReferenced.do?id=5"><strong>5</strong><span
								class="hidden">5</span></a></li>
						
					
					<li class="next">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span>></span>
								</a>
							
							
						</li>
					<li class="last">
							
								<a href="javascript:void(0);" class="diabled-anchor"> <span>Last</span>
								</a>
							
							
						</li>
				</ul>
			</div>
			<div class="col-md-4 col-lg-3 col-sm-12 no-padding pull-left">
				<span class="item_per_label">Items per Page:</span>
				<div class="dropdown display_item_grid pull-left">
					<button class="btn btn-default dropdown-toggle" type="button"
						id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
						16 <span class="caret"></span>
					</button>
					<ul class="dropdown-menu" role="menu"
						aria-labelledby="dropdownMenu1">
						<li role="presentation"><a role="menuitem" class="selected"
							tabindex="-1" href="javascript:void(0);">16</a></li>
						<li role="presentation"><a role="menuitem" tabindex="-1"
							href="javascript:void(0);">32</a></li>
						<li role="presentation"><a role="menuitem" tabindex="-1"
							href="javascript:void(0);">48</a></li>
					</ul>
				</div>
			</div>

Open in new window




Thanks
fordraiders
XMLJavaScriptWeb Development

Avatar of undefined
Last Comment
Fordraiders

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
mccarl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Fordraiders

ASKER
mccarl,
"But I am also unsure as to if this will even work once you have the right element selected. I'm sure it would work if the link were real links, with URL's to take you to the next page, but it appears that these are just managed javascript which knows how to load the next page. Anyway, I guess you just have to try it and see."

Thanks and yes, it's a managed javascript routine. i think that is my problem.
So  there is not way to get the xpath string to include the routine ?

NextRecordsReferenced.do

Thanks
fordraiders
Fordraiders

ASKER
mccarl, Based on the syntax you gave me

I tried this and it worked.

//li[@class='page_numbers']/a

I replaced 'next' with 'page_numbers'

that works..

now when the pagination needs to end in data miner, it goes back to the beginning and starts over.

But thats not your problem.

Thanks
fordraiders
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck