I have an xml schema and an xml file. When parsing the xml file I would like
to perform operations on elements marked in the schema with the "search:able"
attribute. See sample files below.
Any tips/tricks on how to achieve this?
----------------------XML Schema sample----------------------
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:search="http://www.test.com/test">
<xs:element name="Customers">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="CustomerID" type="xs:unsignedByte" search:able="ID"/>
<xs:element name="FirstName" type="xs:string" search:able="Y"/>
<xs:element name="LastName" type="xs:string" search:able="N"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
----------------------XML File sample----------------------
<?xml version="1.0" encoding="utf-8" ?>
<Customers>
<Customer>
<CustomerID>1</CustomerID>
<FirstName>Geir</FirstName>
<LastName>Aamodt</LastName>
</Customer>
<Customer>
<CustomerID>2</CustomerID>
<FirstName>Test</FirstName>
<LastName>Testing</LastName>
</Customer>
</Customers>