How to create a XML object from String in Java?
问题 I am trying to write a code that helps me to create a XML object. For example, I will give a string as input to a function and it will return me a XMLObject. XMLObject convertToXML(String s) {} When I was searching on the net, generally I saw examples about creating XML documents. So all the things I saw about creating an XML and write on to a file and create the file. But I have done something like that: Document document = new Document(); Element child = new Element("snmp"); child