XPath question

webmasterbeta

New Member
I am trying to get a handle on XPath, but I must be missing something. Basedon the XML doc below, I am trying to get two sets of "Alert" nodes: one wherethe "type" attribute is "A" and another where the "type" attribute is "P".I've tried innumerable variations of something like this:NetuitiveAlerts/Alert[@type = "A"]but nothing seems to work; my IXMLDomNoteList is always empty. Any help wouldbe appreciated. The XML doc follows:<?xml version="1.0" encoding="UTF-8" ?><Netuitive><s:Schema name="NetuitiveNetIQAlertsSchema" xmlns:s="urn:schemas-microsoft-com:xml-data"xmlns:dt="urn:schemas-microsoft-com:datatypes"><s:ElementType name="AlertTime" dt:type="dateTime"/><s:ElementType name="InputName" dt:type="string"/><s:ElementType name="Value" dt:type="r4"/><s:ElementType name="Alert" model="closed" content="eltOnly" order="seq"><s:AttributeType name="type" dt:type="enumeration" dt:values="A P" required="yes"/><s:attribute type="type"/><s:element type="AlertTime"/><s:element type="InputName"/><s:element type="Value"/></s:ElementType><s:ElementType name="NetuitiveAlerts" model="closed" content="eltOnly"order="seq"><s:AttributeType name="timestamp" dt:type="dateTime" required="yes"/><s:attribute type="timestamp"/><s:element type="Alert" minOccurs="0" maxOccurs="*"/></s:ElementType></s:Schema><n:NetuitiveAlerts xmlns:n="x-schema:#NetuitiveNetIQAlertsSchema" timestamp="2000-03-20T15:04:00"><n:Alert type="A"><n:AlertTime>2000-03-20T15:04:00</n:AlertTime><n:InputName>YoMama</n:InputName><n:Value>34728.378</n:Value></n:Alert><n:Alert type="P"><n:AlertTime>2000-03-20T16:04:00</n:AlertTime><n:InputName>YoMama</n:InputName><n:Value>57838.278</n:Value></n:Alert></n:NetuitiveAlerts></Netuitive>
 
Back
Top