When I create a document type from this XSD. The document type values are containing bb in front of each field. But I want to generate an XML which do not contain bb in front of the fields.
Now it is this way,
bb:name
bb:age
bb:location
But I want an xml which has
name
age
location
Can you please suggest how to remove namespace. I do not want to change the XSD.
I don’t think you can remove the namespace prefix without changing the XSD. The namespace prefix is a part of the element name now. For example:
“bbb:Customer” is not the same as “Customer”, as these two elements may belong to difference namespaces.
You can try to change the element names manually in Developer, but I am not sure if this will work. Another workaround you can use is to define your own data format (canonical or internal), and then map the XSD format into this before doing any further mapping/transformations.
Yup, that would be the easiest way of doing it if your XSD only contains one name space. However this will not work if your XSD refers to, or imports, elements from another schema which are defined by a namespace prefix.
convert your document to XML values by using documentToXMLValues, next call transformer service pub.string.replace and map the xml values to inString search for bb: replace with just leave it blank next map the output value back to xml values and XMLValuesToDocument buildin service.