How to get namespace in a xml file?

When I am converting one document to xml … I want

<?xml version="1.0" encoding="utf-8" standalone="yes"?> ,

this namespace should come .But how to get this?

Kindly help me.


Best way is in the documentToXmlString service set nsDecls or in a crude way you can use replace service and search for

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

and replace with

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

in the xmldata string:

HTH,
RMG