I was working with OutputDocument (the helper to modify the HTML content) I noticed that there is no way to replace easly the value of an attribute or the attribute itself.
I used the standard method String.replace("pattern","newValue")
With a segment or a element, you can use the position (getBegin() or End) but there is not such of mechanism for attributes.
Did i miss something?
Cheers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Attribute class also extends Segment, so has getBegin() and getEnd() methods. It also has a getValueSegment() method to get the begin and end positions of the value.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I was working with OutputDocument (the helper to modify the HTML content) I noticed that there is no way to replace easly the value of an attribute or the attribute itself.
I used the standard method String.replace("pattern","newValue")
With a segment or a element, you can use the position (getBegin() or End) but there is not such of mechanism for attributes.
Did i miss something?
Cheers.
The Attribute class also extends Segment, so has getBegin() and getEnd() methods. It also has a getValueSegment() method to get the begin and end positions of the value.
The documentation of the Attributes class also mentions a way of adding or deleting attributes.