What language? What implementation? It is always a good idea to at least tag which language you are trying to implement in.
The idea is to iterate through the attributes parameter in the startElement() function/method:
A Java solution:
public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
{
int len = atts.getLength();
// Loop through all attributes and save them as needed
for(int i = 0; i < len; i++)
{
String sAttrName = atts.getLocalName(i);
if(sAttrName.compareTo("URL") == 0)
{
String sVal = atts.getValue(i);
// Do something with the *.jpg
}
}
}
A C++ Xercesc solution:
void MyClass::startElement(const XMLCh *const uri, const XMLCh *const localname,
const XMLCh *const qname, const Attributes &attributes)
{
// Loop through all attributes and save them as needed
XMLSize_t len = attributes.getLength();
for(XMLSize_t index = 0; index < len; index++)
{
CString cAttrName(attributes.getLocalName(index));
if(cAttrName.Compare(L"URL") == 0)
{
CString cVal(attributes.getValue(index));
// Do something with the *.jpg
}
}
}