xml - Java Inner Text (getTextContents()) Problem -
I am trying to parse something in Java and I am using the Cobra HTML Parser so that HIM can get a DOM I'm using XPath to get the nodes. I call node.gettextContents () when I get to the desired level, but it should
"\ N \ n \ nValue \ n- \ nValue \ n \ n \ n"
what to do to get rid of the line breaks Ta remains? I would like to do a RegEx such as
(?: \ S * ([^ -] +) \ s * - \s * ([^ -] +) \ s *)
happens on the inner text and in fact does not want to deal with possible white space symbols in the middle of the text.
Example input:
value - value
thanks
.
The string has been trimed = original_string.values ("\ n", "");
The first argument is a regular expression: You can change the block with all forceps in the original string with replaceAll ("\\ s +", "")
For example.
Comments
Post a Comment