I want to read the comment-content from source but do not find a working solution.
Neither TextExtractor nor subsequence returns the content of this attribute.
To state an example: Source contains e.g. <style type="text/css"> <!- someStyleIWantToExtract -></style>
while I currently get <style type="text/css"><!- -></style>
and I am not able to access the "someStyleIWantToExtract " content via the Element-class. Any hints how to accomplish this?
Thanks a lot.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A comment is considered to be one big start tag rather than an element with separate start tag, content and end tag. To get the content of a comment, you need to use the StartTag.getTagContent() method.
Regards,
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to read the comment-content from source but do not find a working solution.
Neither TextExtractor nor subsequence returns the content of this attribute.
To state an example: Source contains e.g. <style type="text/css"> <!- someStyleIWantToExtract -></style>
while I currently get <style type="text/css"><!- -></style>
and I am not able to access the "someStyleIWantToExtract " content via the Element-class. Any hints how to accomplish this?
Thanks a lot.
A comment is considered to be one big start tag rather than an element with separate start tag, content and end tag. To get the content of a comment, you need to use the StartTag.getTagContent() method.
Regards,
Martin
Thanks, Martin. This is exactly what I needed.