Skip to content

Is getText with delimiter really necessary? #5

Description

@JenniferSimonds

Calling getText(xpath) returns the text of the first node that matches the xpath, calling getText(delimiter, xpath) returns a string that's a delimited list of node contents, and getTextList returns a List.

I've found that I don't ever use getText with delimiter; I always call getTextList & iterate thru the String[] result. So, is getText(delimiter, xpath) really necessary?

We can't define two getText's, one that returns a single String and another that returns a String[], so I think we're stuck having two differently-named methods for these. But maybe we should just deprecate the delimited-list version?

Let us know if you find it useful to you and it should be kept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions