htmlquery icon indicating copy to clipboard operation
htmlquery copied to clipboard

Add method with combined SelectAttr and ExistsAttr functionality

Open moredure opened this issue 4 years ago • 1 comments

Attr method should allow to use returned value in case attr exists (even for attributes without value) or discard value in case it's missing.

moredure avatar Aug 22 '21 08:08 moredure

Can you elaborate on what this does? Is it getting used at all within the project? Sorry i had to ask. Comments add relevant info that allows people like me, which dont have involvement or barely any into a project understand and maybe, just maybe, give a f*** about what others do in general.

mathieu-aubin avatar Jan 03 '22 06:01 mathieu-aubin

Sorry, I read all the questions or PR, but some of question were not answered in time and then forgot for a long time.

I had merged PR #44 that add new mthod ExistsAttr(), new method Attr) (val string, exists bool) is not necessary, use SelectAttr() if you want to get the attribute value, or use ExistsAttr() if just check the specified node whether exists the attribute.

zhengchun avatar Jan 17 '23 15:01 zhengchun

@zhengchun, thank you!

moredure avatar Jan 17 '23 16:01 moredure