You can use "xsd:hexBinary" or "xsd:base64Binary"
http://www.w3.org/TR/xmlschema-2/#hexBinary
http://www.w3.org/TR/xmlschema-2/#base64Binary
And try to rename "File" to "FileContent" or something like that :-)
Also think about meta-information like last-modification date,
filesystem attributes, if you need this.
Smith, Duane E (GE Consumer & Industrial) schrieb:
We have the need to embed a file into the XML.
Trying to figure out the best way to setup an xsd file to allow the source
generator to create the class file.
XSD file would look similiar to the below
I found some mention in the docs a type that would use a byte array
But I don't know the process to read a file and load the byte array, and
reverse the process to go from the xml back to a file.
Thanks for any assistance
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FileRequest" type="FileRequestType" />
<xsd:complexType name="FileRequestType">
<xsd:sequence>
<xsd:element name="Status" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="FileName" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="File" type="????" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Duane Smith
Information Technology
Appliance Engineering Systems Support
GE Consumer & Industrial
Phone (502) 452-7843 *334-7843
Fax (502) 452-0512
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------