Hello,

I'm using the Xcc.Net library to load documents up to an ML server and have
been having trouble with documents that are in UTF-8 with a BOM (byte order
mark) at the beginning of the file. 

My code is:

Stream s = new FileStream(directory + mi.filename, FileMode.Open,
FileAccess.Read);                
ContentCreateOptions co = new ContentCreateOptions();
co.Format = DocumentFormat.Format.XML;
co.RepairLevel = DocumentRepairLevel.Level.NONE;
Content con = ContentFactory.NewContent(mi.uri, s, co);
ses.InsertContent(con);

When ML loads an XML document with a BOM it loads it in as text - even
though the co.Format has been set. Is there a way of making ML skip the BOM
(or even better obey it) or will I have to put in a test and skip those
bytes in the stream?

Thanks

Dom

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to