The xs:hexBinary type of element in the XML schema is for writing an array of N count bytes. Elements of this type have the required "oda:countBytes = "name | value" " attribute. The element that is referenced by "oda:countBytes" (if it does not contain a number) must be marked with the oda: "isCondition = "" " attribute.
An xs:hexBinary element can have the following attributes:
pFiler->wrInt16(size);
pFiler->wrBytes (buffer, size);
pFiler->wrString(str);
pFiler->wrInt32(element);
pFiler->wrBytes(buffer_2, 10);
pFiler->wrInt8(bSize);
pFiler->wrBytes(buffer_3, bSize*size);
<xs:element name="Size" type="xs:short" oda:isCondition=""/>
<xs:element name="binaryArray" type="xs:hexBinary" oda:countBytes="Size"/>
<xs:element name="str" type="xs:string"/>
<xs:element name="someElement" type="xs:int"/>
<xs:element name="binaryData" type="xs:hexBinary" oda:countBytes="10"/>
<xs:element name="bSize" type="xs:byte " oda:isCondition=""/>
<xs:element name="binaryData_2" type="xs:hexBinary" oda:countBytes="Size* bSize "/>
int bitLen = pFiler->rdInt32();
int len = bitLen / 8;
pFiler->rdBytes(tmpData.asArrayPtr(), len);
int bitLen_2 = pFiler->rdInt32();
int len_2 = bitLen_2 * 2;
pFiler->rdBytes(tmpData.asArrayPtr(), len_2);
<xs:element name=" bitLen" type="xs:int" oda:isCondition=""/>
<xs:element name="tmpData1" type="xs:hexBinary" oda:countBytes=" bitLen" oda:reduceIn="8"/>
<xs:element name=" bitLen_2" type="xs:int" oda:isCondition=""/>
<xs:element name="tmpData2" type="xs:hexBinary" oda:countBytes=" bitLen_2" oda:increaseIn="2"/>
Working with the XML Scheme for Revision Control
Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.
|