xpath question - Mailing list pgsql-novice
From | Sean Davis |
---|---|
Subject | xpath question |
Date | |
Msg-id | 264855a00711190703n33a0ddb5x81f5f97bf08def41@mail.gmail.com Whole thread Raw |
List | pgsql-novice |
Just a quick question, not being a big xpath or xml user in the past. Why does this: select xpath('//Abstract/AbstractText[1]',content) from medlinexml; return an array for each entry rather than a single xml entry? I thought that appending the [1] should not return an array, but a single xml value instead. Thanks, Sean example output below {"<Abstract> <AbstractText>Strains of Pseudomonas aeruginosa, isolated from the sputum of relatively fit patients with cystic fibrosis (CF) who had been recently colonized by the organism, showed typical cultural and serologic characteristics. The majority of strains of P. aeruginosa isolated from CF patients with chronic bronchopulmonary infection had 3 distinctive features, loss of 0 serotype reaction, expression of a new somatic antigen, and sensitivity to normal human serum. Patients with organisms with one or two of these features were more severely affected by the disease. The appearance of these variants may represent a critical stage in the progression of CF.</AbstractText> </Abstract>"} {"<Abstract> <AbstractText>The changes in airway caliber and plasma cyclic-AMP levels after intravenously administered aminophylline, and the effect of DL- and D-propranolol on these responses have been investigated in a double-blind manner in normal subjects. Aminophylline 5.6 mg/kg was given intravenously over a 10-min period and the airway response was measured as change in specific airway conductance (delta SGaw) in the body plethysmograph. In the initial study in 6 subjects, orally administered placebo or propranolol was followed 2 h later by intravenously administered aminophylline. Neither placebo nor propranolol alone caused any change in SGaw at 2 h. After placebo, intravenously injected aminophylline produced a 30% increase in SGaw, reaching a peak 5 min after injection. This response was equivalent to 77% of the maximal response to 400 micrograms inhaled albuterol in the same subjects. After propranolol, the airway response to aminophylline was attenuated, with a 53% reduction in delta SGaw at the time of peak response. In a further study on 6 subjects, intravenously given aminophylline produced a 25% increase in SGaw and a 51% increase in plasma cyclic-AMP levels after placebo tablets. Pretreatment with 40 and 80 mg DL-propranolol caused a dose-dependent reduction of both the airway and plasma cyclic-AMP response to aminophylline. The airway response to aminophylline was not attenuated by D-propranolol so the effect of DL-propranolol is thought to be due to beta-adrenoceptor blockade. The absence of any detectable change in SGaw after DL-propranolol suggests there is little resting sympathetic tone to the airways in normal subjects. In the absence of sympathetic stimulation, the rapid response to aminophylline is unlikely to be due to phosphodiesterase inhibition. The attenuation of the airway and cyclic-AMP response by propranolol suggests that part of the action of aminophylline may be due to beta-agonist activity.</AbstractText> </Abstract>"}
pgsql-novice by date: