In my program I extract text from one of the element in my xml document and I need to change the root element of the xml document to the text that I’ve extracted from one of the element in the doc
Element rootElement = (Element) xmlObject.getElement();
Element element= rootElement.getChild("Element");
String text= element.getText();
rootElement.setName(text);
I get an error [I]The name “Internal Training”(which is the text returned) is not legal for JDOM/XML elements: XML names cannot contain the character " "
How do I remove the characters “”.