xpath sting?

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
so i need to create a string in xpath
Код:
//div[contains(@class,'UFICommentContent')]; // every comment wraper
   //a[contains(@class,'UFICommentActorName')]; // inside wrapper poster's name for comment
   //span[contains(@class,'UFICommentBody')]/span; // inside wraper the post data from that comment
     //span/img; // inside wrapper & inside comment body this is incase of emoji or images
i need to creat a loop that im already in to grab all the comments

my main string alreay conisit of
Код:
  string fullPost, postUrl, postText, postAuthor, postTime, postAction, postBody, postComment;  
   postUrl = postText = postAuthor = postTime = postAction = fullPost = postBody = postComment = string.Empty;
but is it posible to next a string in a string befor the second (main string) runs? so i can grab the commentors name and their comment?
if it is what would it look like?
i can grab the whole reply section but then its a jubiled togetehr mess. i need to parse it out neater then it is

basicly i want to grab all of the //div[contains(@class,'UFICommentContent')]
inside the DocumentNode ive grabed
parse out the exsisiting actor name and comment separate them by the charicter,then place a difrent charicter at he end of the string here, then i want and move to the next comment UFICommentContent in the document.... but how do i loop it? im lost on this part?

Код:
  var CommentsBlockNode = doc1.DocumentNode.SelectNodes("//div[contains(@class,'UFICommentContent')]");
   var CommentorNameNode  = doc1.CommentsBlockNode.SelectSingleNodes("//a[contains(@class,'UFICommentActorName')]");
   var CommentorBodyNode  = doc1.CommentsBodykNode.SelectNodes("//span[contains(@class,'UFICommentBody')]");
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 226
Благодарностей
5 844
Баллы
113

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
unfortunatly no.... i can find what i need and excute them prety well my issue is in the retriacal im ending up grabbing it wrong... im ending up with like 200+ colums in my tables when i just wanted th einfo placed in 1 colum....
i want to maek one node grab all the results of the match and then print that one node to one var
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)