Hi,
I have a string which contains XML.
I want to remove its first line and save it back to String.
How can I do that?
Thanks
You can split your string so that you get all the different lines in an array, like this:
String[] lines = yourString.split(System.getProperty("line.separator"));
Then you just select the ones you want. :)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.