Converting String into Node-set
Usage in SAXON9
I am wondering if I can directly convert a String into xml Node set and return it. Currently my code gets a node set(doc in java). Java code does what it needs to do and then returns a HTML in a string.
I want to return a Node-set and not a string. Currently I m using :
DocumentBuilderFactory factory= DocumentBuilderFactory.newDocumentBuilder();
document html=builder.parse(newInputSource(new StringReader(S)));
then create more childs and keep adding to this string.
then return Document;
Is there another cleaner way.