1
Comment sélectionner le texte interne d'un noeud XML à l'aide de XQuery?Utilisation de XQuery dans SQL Server 2005 pour obtenir le code XML interne
Microsoft Books montre en ligne comment retrive un attribut ci-dessous:
DECLARE @myDoc xml
DECLARE @ProdID int
SET @myDoc = '<Root>
<ProductDescription ProductID="1" ProductName="Road Bike">
<Features>
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
</Root>'
SET @ProdID = @myDoc.value('(/Root/ProductDescription/@ProductID)[1]', 'int')
SELECT @ProdID
Comment pourrais-je obtenir la valeur de texte interne du nœud de garantie?