Fady Sayegh
Posts: 7
Joined: 2012-09-12
|
Hi All,
i'm trying to parse all the "P" tags of the html document and under each on of them i need to a new tag "P".
int i = 0;
mshtml.IHTMLElementCollection Elems = HTMLDocument.getElementsByTagName("P");
mshtml.IHTMLElement oElementToAdd = null;
foreach (mshtml.IHTMLElement Elem in Elems)
{
oElementToAdd = oHTMLDocument.createElement("P");
oElementToAdd.innerText = "Appended element " + i++.ToS tring();
// Insert the P TAG
}
in the above snipped code, i'm looping through all the P tags in the document, for each p tag i'm creating a new "P" tag but i'm not able to find a solution to add the new "P" tag (oElementToAdd in the snipped code).
can you please indicate me how to do
best regards and thanks in advance
Fady Sayegh |
|
Eugene Astafiev
Guest
|
|