how can I get the XML namespace from an IS document type in WM6.1

I need to get the value of the XML namespace Property from a Document Type. For example XML namespace urn:rosettanet:specification:interchange:SalesReportNotification:xsd:schema:1.0.

I know that a built-in service does not exist to get this Propperty. Wemethods told us to use pub.xml:documentToXMLString and add the namespace declarations to xml strings by populating the “nsdecls” parameter.
We can use the above service, but this does not resolve the problem on how to get the namespace without hardcoding it in the above service.

Does anyone have a flow or java service that can get the XML namespace from the Document type?

You want to get the namespace from a document type definition, not a populated instance of a document, right?

I don’t know of a way to do that.

Why is it that you need the namespace from the document type definition? If you are creating new documents you can read namespace names from a properties file and then dynamically create an nsdecls document to pass into your pub.xml:documentToXMLString call.

If you want to get the namespace of a node (parsed XML document) you can use the /*/namespace() XQL query.

HTH,

Mark

Hi,

Can any one help me on how to get the name of the XML node.

Thats is for ex

example

How do i get the tag1 by using XSL or XQL. I want to get those node names to do some processing dynamically.Let me know ASAP.

Regards,
Ananth

Ananth,

Try using pub.xml:queryXMLNode with the XQL query “/*/nodeName()”.

Mark