Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

SimpleNodeSearch in DOMVisitor example

Post Reply
PioPio
Posts: 42
Joined: Sun Nov 05, 2017 10:25 pm

SimpleNodeSearch in DOMVisitor example

Post by PioPio »

Hello again,

Can the procedure SimpleNodeSearch in the in DOMVisitor example be encapsulated in a class safely or are there any restrictions?

Many thanks
Alberto
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: SimpleNodeSearch in DOMVisitor example

Post by salvadordf »

You shouldn't keep references to the document parameter or its nodes outside the scope of DOMVisitor_OnDocAvailable.

If you use a class to search for nodes make sure you set to NIL all the fields in that class that were used to reference the document or its nodes before DOMVisitor_OnDocAvailable has finished executing.
Post Reply