c# - How should I use HTMLAgilityPack AppendNode? -


There was a real headache on this level on Friday! I'm trying to insert a HtmlNode to insert the second (). I can see the refChild node with the breadcrumb ID when I get it rpint for the console but the following error keeps getting the following error:

  System.ArgumentOutOfRangeException: node "

My code is:

  HtmlWrapper.InsertAfter (ContentNode, HTML.selectsection node ("// divi [@ id = 'breadcrumbs']"));  

And like I have mentioned, I've printed both the HtmlWrapper and HtmlWrapper.selectSingleNode ("// div [@ id = 'breadcrumb']" for the console and can see the node on the screen

From a very simple examination of the source, it seems that the InsertAfter wants refChild the direct child of the node that you have on your div node on InsertAfter , It is that the actual node can be passed in the form of refChild isn Since searching (with // ), the entire scion axis will be direct child of HtmlWrapper .

< P> Try pulling HtmlWrapper.SelectSingleNode ("// div [@ id = 'breadcrumb']") in a variable, and then InsertAfter to its Applying on ParentNode .


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -