Creating an event XML file from an XSD

Create an XML file to submit an event message to the Insight server.

Before you begin

Export an XML schema from your event definitions.

About this task

After you export the event definitions to an XML schema, you can use this schema to create event messages. You can perform this task in the Java™ perspective or in the Insight Designer perspective.

Procedure

  1. In the Java perspective, right-click your XSD file, and select Generate > XML File.
  2. Select the folder where you want to save the XML file, enter a file name, and then click Next.
  3. In the Root element field, select the event type for which you want to create an event message, and click Finish. You can also create the XML file in the Insight Designer perspective:
    1. Click File > New > Other. Then, select XML > XML File, and click Next.
    2. Select the folder where you want to save the XML file, enter a file name, and then click Next.
    3. Select Create XML file from an XML schema file, and then click Next.
    4. Select the XSD file from your workspace, or import one into your workspace, and then click Next.
    5. In the Root element field, select the event type for which you want to create an event message, and click Finish.

Results

The content of the XML file is a template for your event message.

Example

The following example shows the content of an XML file for a ticket check-in event message:
<xml version="1.0" encoding="UTF-8"?>
<m:TicketCheckinEvent xmlns:m="http://www.example.com/bmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.com/bmd model.xsd ">
<m:eventDatetime>2001-12-31T12:00:00</m:eventDatetime>
<m:ticket>Ticket</m:ticket>
</m:TicketCheckinEvent>

What to do next

You can submit the event to the Insight Server, for example, by using the REST API.