11
Ho un documento XML e sto cercando di ottenere il numero di nodi con un particolare testo usando xpath. vedere xml sottoFunzione conteggio in XPath
count (// event_type) restituisce il numero di nodi event_type ma quello che voglio è il numero di nodi event_type con testo di errore.
<Response>
<run_id>20091231-105000</run_id>
<message>
<timestamp>2009-12-31T10:50:00.46875+00:00</timestamp>
<event_type>Information</event_type>
<operation>LoadProjects</operation>
<error_code />
<details>LoadProjects request detected</details>
</message>
<message>
<timestamp>2009-12-31T10:50:02.296875+00:00</timestamp>
<event_type>Error</event_type>
<operation>Processor.InitaliseDCFiles</operation>
<error_code />
<details>some error details</details>
</message>
<message>
<timestamp>2009-12-31T10:50:02.296875+00:00</timestamp>
<event_type>Debug</event_type>
<operation>Processor.InitaliseDCFiles</operation>
<error_code />
<details>some details</details>
</message>
<Response>
Grazie
Grazie mille. Funziona. – Walid