Skip to content

Some text nodes not present in tree after parsing - seems to be mixed content with formatted xml #63

Open
@max-carroll

Description

@max-carroll
func Test_MyTest(t *testing.T) {
	assert := assert.New(t)
	inputHtml := `
	<a>
	  <b>hello</b>
		my friend
  </a>`

	topNode, _ := xmlquery.Parse(strings.NewReader(inputHtml))

      //  `my friend` should be a sibling with <b> or a child of <a> but it is neither and unobtainable from the tree structure
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions