Hi, I would like log my keyboad strokes in a xml file. The attribute can be the key, and the value can be the timestamps or the other way ( doesn't matter). I would like to write the schema in the way that my output of schema would be exactly like this:
<LoggingActions>
<Keyboad>
<Entry key="a">0</Entry>
<Entry key="b">1213</Entry>
<Entry key="c">3445</Entry>
</Keyboad>
</LoggingActions>
so far, this is my schema:
<xs:element name="MyEvents">
<xs:complexType>
<xs:sequence>
<xs:element ref="LoggingActions"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="KeyboardEvent">
<xs:complexType>
<xs:sequence>
<xs:element ref="MyKeyEntry"/>
<xs:element ref="Time"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MyKeyEntry">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="keyReference"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Time">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="timeRef"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="keyReference" type="xs:string"/>
<xs:element name="timeRef" type="xs:int"/>
Instead, I am getting this xml as my output:
<LoggingActionsxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<LoggedKey>
<MyKeyEntry>a</MyKeyEntry>
<MyKeyEntry>b</MyKeyEntry>
<MyKeyEntry>c</MyKeyEntry>
</LoggedKey>
<Time>
<timeRef>0</timeRef>
<timeRef>1213</timeRef>
<timeRef>3445</timeRef>
</Time>
</LoggingActions>
How can I combine these two together?
thanks,