we have written a C# program which generates an XML file from a
Client computer and this file is being transfered to the Server
side(using Socket programming). at the Server side we are first
extracting the data from the XML file into a Dataset and using the
method Dataset.ReadXml () we are trying to parse the nodes in the file.
But on debugging the following exception arises---
Unexpected XML declaration. The XML declaration must be the first node
in the document, and no white space characters are allowed to appear
before it. Line 59, position 16.
According to us, the problem occurs when the file is being transfered
from the client to the server, some extra bytes are also transfered.
Is there any solution to the problem?
Client computer and this file is being transfered to the Server
side(using Socket programming). at the Server side we are first
extracting the data from the XML file into a Dataset and using the
method Dataset.ReadXml () we are trying to parse the nodes in the file.
But on debugging the following exception arises---
Unexpected XML declaration. The XML declaration must be the first node
in the document, and no white space characters are allowed to appear
before it. Line 59, position 16.
According to us, the problem occurs when the file is being transfered
from the client to the server, some extra bytes are also transfered.
Is there any solution to the problem?
Comment