I'm trying to parse a html file and I want to extract everything inside a outer div tag with a unique id. Sample:
<body>
...
<div id="1">
<div id="2">
...
</div>
<div id="3">
...
</div>
</div>
...
</body>
Here I want to extract every thing in between <div id="1">
and its corresponding </tag>
NOT the first </div>
tag.
I've gone through many older posts but they don't work because they stop when they see the first </div>
tag which is not what I'm looking for.
Any pointer would be appreciated.