I have some custom tags. <UN_TITLE>
I am trying to get the body of the tags.
if i do
String [] tagsToBeFound = {"TITLE","UN_TITLE"};
I get results when
TagFindingVisitor visitor = new TagFindingVisitor (tagsToBeFound);
parser.visitAllNodesWith (visitor);
but i want to get the data/body between the UN_TITLE tags.
so i created a UNTitleTag extends CompositeTag
i basically copy and pasted a TitleTag.java and changed the needed words.
but when i do
Node nodes [] = parser.extractAllNodesThatAre(UNTitleTag.class);
nodes is always size 0.
is there something else i need to do?
Thanks
<HTML>
<HEAD>
<TITLE>Main</TITLE>
</HEAD>
<UN_TITLE>
Unit Name HERE
</UN_TITLE>
</HTML>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a very simple html file(see below)
I have some custom tags. <UN_TITLE>
I am trying to get the body of the tags.
if i do
String [] tagsToBeFound = {"TITLE","UN_TITLE"};
I get results when
TagFindingVisitor visitor = new TagFindingVisitor (tagsToBeFound);
parser.visitAllNodesWith (visitor);
but i want to get the data/body between the UN_TITLE tags.
so i created a UNTitleTag extends CompositeTag
i basically copy and pasted a TitleTag.java and changed the needed words.
but when i do
Node nodes [] = parser.extractAllNodesThatAre(UNTitleTag.class);
nodes is always size 0.
is there something else i need to do?
Thanks
<HTML>
<HEAD>
<TITLE>Main</TITLE>
</HEAD>
<UN_TITLE>
Unit Name HERE
</UN_TITLE>
</HTML>
thanks from Derrick
factory.registerTag (new UnitNetTitleTag ());