Getting element tag path in jSoup

beziak1

New Member
Is there an efficient way to get an HTML element tag path of all the open but not closed tags with jSoup?E.g. if the HTML is\[code\]<!DOCTYPE html><html> <head>...</head> <body> <section id="secID"> <div class="divClass"> <section id="subSection"> <h3>Heading</h3> <ul class="list"> <li>\[/code\]when I get to \[code\]li\[/code\], I want its path to be \[code\]html->body->section->div->section->ul\[/code\]
 
Back
Top