2

how can i get specific elements from html page if i have this nsstring with this value

<body style="background-color: 3399CC;font-size: 200.5%;font-family:monospace;font-style:oblique;">


<div id="1" align="center" style="padding-top: 10%;" >
 <h1 style="color: #FFFFFF">fawazapp</h1>
 <p style="color: #C0C0C0;"> bbb</p>
 <p style="color: #FFFFFF;">aaaaaaaaa</p>

 </div>

<div id="2" align="center" style="padding-top: 10%;" >
 <h1 style="color: #FFFFFF">fawazapp</h1>
 <p style="color: #C0C0C0;"> bbb</p>
 <p style="color: #FFFFFF;">aaaaaaaaa</p>

 </div>

I want to clear everything except div with id number 2 to be like this

 </div>

<div id="2" align="center" style="padding-top: 10%;" >
 <h1 style="color: #FFFFFF">fawazapp</h1>
 <p style="color: #C0C0C0;"> bbb</p>
 <p style="color: #FFFFFF;">aaaaaaaaa</p>

 </div>
Wain
  • 118,658
  • 15
  • 128
  • 151
Fawaz
  • 584
  • 1
  • 11
  • 24

1 Answers1

0

UIWebView has a method stringByEvaluatingJavaScriptFromString: so if you have (or create) some javascript to navigate / manipulate / interrogate the page contents you can run it to obtain the result.

Wain
  • 118,658
  • 15
  • 128
  • 151