how to use following xml query with out prefix

  • hi,

       in following link 

    https://msdn.microsoft.com/en-us/library/ms175178.aspx

    i found  this cote
    "This prefix is then used in the query body instead of the namespace URI"

    this makes me fell that if i do not specify prefix then i have to use uri in place of prefix. 

    can any body give me an example of using uri in place of prefix.

    yours sincerley

  • rajemessage 14195 - Wednesday, March 8, 2017 8:38 AM

    hi,

       in following link 

    https://msdn.microsoft.com/en-us/library/ms175178.aspx

    i found  this cote
    "This prefix is then used in the query body instead of the namespace URI"

    this makes me fell that if i do not specify prefix then i have to use uri in place of prefix. 

    can any body give me an example of using uri in place of prefix.

    yours sincerley

    You don't actually need the name space or the "prefix" for it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Wednesday, March 8, 2017 4:57 PM

    rajemessage 14195 - Wednesday, March 8, 2017 8:38 AM

    hi,

       in following link 

    https://msdn.microsoft.com/en-us/library/ms175178.aspx

    i found  this cote
    "This prefix is then used in the query body instead of the namespace URI"

    this makes me fell that if i do not specify prefix then i have to use uri in place of prefix. 

    can any body give me an example of using uri in place of prefix.

    yours sincerley

    You don't actually need the name space or the "prefix" for it.

    that is fine that we do not need any , but i want to understand, that what he is trying to say.
    if u read the part of aritcal, you will find he has used prefix, what i want to know is if we do not use prefix then how a query would be written (with uri).

       if  u read this line which is creating doubt "This prefix is then used in the query body instead of the namespace URI." that creates doubt , if i do not use prefix then we may have to use uri in place of it , this is where i need clarification and exampl.

  • The article is referring to the fact that you don't have to use qualified namespaces in many cases.  IF you do have to use qualified namespaces OR the XML comes with namespaces defines, then you HAVE to have a prefix for it (or you set the one namespace as default), and then refer to the names it defines using the namespace prefix.

    If you don't use custom types or  reuse anything then chances are you wouldn't need to have the namespaces specified.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 4 posts - 1 through 3 (of 3 total)

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