Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Explicitly defining namespace in For XML query Expand / Collapse
Author
Message
Posted Monday, February 04, 2013 12:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 13, 2013 8:29 AM
Points: 2, Visits: 24
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!
Post #1415458
Posted Tuesday, February 05, 2013 6:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:57 PM
Points: 6,724, Visits: 11,771
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

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1415787
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse