Udostępnij za pośrednictwem


Określanie osi (SQLXML 4.0)

  • Oś określa drzewo zależności między węzły zaznaczone krok lokalizacji i węzeł kontekstu.Obsługiwane są następujące osi: child

    Zawiera podrzędność węzeł kontekstu.

    Następujące wyrażenie XPath (ścieżka lokalizacji) powoduje zaznaczenie bieżącego węzła kontekstowego wszystkie <klienta> dzieci:

    child::Customer
    

    In the following XPath query, child is the axis.Customer is the node test.

  • parent

    Zawiera nadrzędnego węzła.

    The following XPath expression selects all the <Customer> parents of the <Order> children:

    child::Customer/child::Order[parent::Customer/@customerID="ALFKI"]
    

    Jest to równoważne child::Customer.In this XPath query, child and parent are the axes.Customer and Order are the node tests.

  • attribute

    Zawiera atrybut węzeł kontekstu.

    Następujące wyrażenie XPath wybiera IDklienta atrybut węzeł kontekstu:

    attribute::CustomerID
    
  • self

    Zawiera węzeł kontekstu sam.

    The following XPath expression selects the current node if it is the <Order> node:

    self::Order
    

    W tej kwerendzie XPath self jest oś i Order jest rozgrzanych węzła