Topic
  • 3 replies
  • Latest Post - ‏2012-10-09T13:28:23Z by SystemAdmin
Lakh
Lakh
5 Posts

Pinned topic Add default namespace to child elements to output xml

‏2012-10-08T04:25:09Z |
Hi,

I am getting below xml output from (copy book to xml mapping) map.

<?xml version='1.0' encoding='UTF-8'?>
<TEST>
<HEADER name="TONY" state="CA"></HEADER>
<DATA accounno="45454398" bal="564"></DATA>
</TEST>

but i need to add default namespaces like below without doing from scratch.

<?xml version='1.0' encoding='UTF-8'?>
<TEST>
<HEADER xmlns="http://abc.com" name="TONY" state="CA"></HEADER>
<DATA xmlns="http://xyz.com" accounno="45454398" bal="564"></DATA>
</TEST>

Please help me.
Updated on 2012-10-09T13:28:23Z at 2012-10-09T13:28:23Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: Add default namespace to child elements to output xml

    ‏2012-10-08T10:48:18Z  
    When you import a Type Tree from schema, define the XSDL hints for all elements. This will allow to specify xmlns value at all levels.
  • Lakh
    Lakh
    5 Posts

    Re: Add default namespace to child elements to output xml

    ‏2012-10-08T13:45:27Z  
    When you import a Type Tree from schema, define the XSDL hints for all elements. This will allow to specify xmlns value at all levels.
    Hi,

    I imported as XSDL Hints location to all global elements. did not ask me specify namespace. can u specify where exactly we can add namespace.
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: Add default namespace to child elements to output xml

    ‏2012-10-09T13:28:23Z  
    • Lakh
    • ‏2012-10-08T13:45:27Z
    Hi,

    I imported as XSDL Hints location to all global elements. did not ask me specify namespace. can u specify where exactly we can add namespace.
    It should be added as part of your map rules.