Explicitly defining namespace in For XML query

  • I need to mimic the Namespace of a legacy app exactly.

    It should look like this:

    <Customers xmlns="x-schema:D:\APPS\Customer.xdr">

    </Customers>

    When I put in my query With Namespace

    WITH XMLNAMESPACES ('x-schema:D:\APPS\Customer.xdr' as ns)

    I get:

    <Customers xmlns:ns="x-schema:D:\APPS\Customer.xdr">

    When I try to not specify 'as ns' I get an error.

    How can I match this exactly?

    <Customers xmlns="x-schema:D:\APPS\Customer.xdr">

    Thanks!

  • Try it like this:

    WITH XMLNAMESPACES (DEFAULT 'x-schema:D:\APPS\Customer.xdr')

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply