Thursday, July 28, 2011

Embedded XSD

Looks like it IS possible to embed XSD data inside the XML, meaning we don't need to make an XSD file for each kis/gps xml file we generate.

Expect the new kisxml format to be based on this example:
https://www.kismetwireless.net/code/svn/trunk/xml/contained.xml

which valides with xmlstarlet and seems to output a sane collection of xpaths when dom-parsed:

k:run
k:run/xs:schema
k:run/xs:schema/xs:import
k:run/xs:schema/xs:import
k:run/xs:schema/xs:import
k:run/xs:schema/xs:import
k:run/xs:schema/xs:import
k:run/xs:schema/xs:element
k:run/version
k:run/startTime
k:run/endTime
k:run/captureSource
....
k:run/device/deviceMac
k:run/device/name
k:run/device/firstSeen
k:run/device/lastSeen
k:run/device/frequencySeen
k:run/device/frequencySeen/frequency
k:run/device/packetLink
k:run/device/packetData
k:run/device/packetFiltered
k:run/device/packetError
k:run/device/dataBytes
k:run/device/type
k:run/device/ssid
k:run/device/ssid/firstSeen
k:run/device/ssid/lastSeen
k:run/device/ssid/type
k:run/device/ssid/essid

The extended device elements are cleanly integrated into the DOM.

This file also presents no problems to the Python XML parser ETree, so I think it's going to be fairly reasonable to implement tools using it.

If you handle XML from Kismet, let me know / stop by IRC.

No comments:

Post a Comment