Parse string with Tag and create node tree (support nest) #339
Unanswered
yamanetaisei
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@aarsland @mbrandonw @acosmicflamingo Those who took part in this discussion may have already moved on. If you don't mind, can you give me some ideas? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to identify the text between the Tags.
For that I am trying to generate a NodeTree.
I have text like this
The definition of Node is as this.
Node Tree is represented by an array of Node.
I defined a Parser like this.
This discussion was used as a reference for how to make it
Parse string with HTML tag and transform to Text
This Parser can nest text with different attributes
However, nesting text with the same attributes will not parse correctly
The problem is that
</small>
, which should be a child element, is used as the parent's closeTagOthers such as these are not parsed correctly
<small>abc<small>def</small>ghi<small>jkl</small>mno</small>
Is there anyone who can give me any advice?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions