Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Wed, 30 Apr 2008 11:21:02 -0700,    group: microsoft.public.xml        back       


MIME/base64 encoded files in an XML document?   
I have a schema for XML docs in which I need to handle embedded binary files. 
I defined it with mime/base64 encoding and am looking for advice about 
whether this is the right approach to handle this:

 <xs:complexType name="AttachedFile">
    <xs:sequence>
      <xs:element name="FileName" type="xs:string">
        <xs:annotation>
          <xs:documentation>Name of the attached file</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Description of the attached 
file</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DateAttached" type="xs:dateTime" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Date that the file was attached to the 
application</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="File" type="xs:base64Binary" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The attached file in MIME (base64) encoded 
format</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

Thanks!
AdamM
date: Wed, 30 Apr 2008 11:21:02 -0700   author:   Adam M

Re: MIME/base64 encoded files in an XML document?   
Adam M wrote:
> I have a schema for XML docs in which I need to handle embedded binary files. 
> I defined it with mime/base64 encoding and am looking for advice about 
> whether this is the right approach to handle this:


>       <xs:element name="File" type="xs:base64Binary" minOccurs="0">
>         <xs:annotation>
>           <xs:documentation>The attached file in MIME (base64) encoded 
> format</xs:documentation>
>         </xs:annotation>
>       </xs:element>

That schema snippet looks all right to me.



-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Thu, 01 May 2008 13:14:19 +0200   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us