By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

XML over TCP

P: n/a
Hi all,
I have an VB.NET application the is sending XML files over TCP. I would like to know if there is a standard syntax for signaling the "end-of-file" for XML. I know I could concatinate whatever, but am looking for a standard, if it exists.

Thanks in advance
Goran Djuranovic

Nov 15 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Goran Djuranovic" <go**************@newsgroups.nospamwrote in
news:uM*************@TK2MSFTNGP02.phx.gbl:
I have an VB.NET application the is sending XML files over TCP. I
would like to know if there is a standard syntax for signaling the
"end-of-file" for XML. I know I could concatinate whatever, but am
looking for a standard, if it exists.
End of file is determined by your file schema.

You can use a DTD to validate if the file was transferred succesfully.
Nov 15 '06 #2

P: n/a
Hi,
To use DTD I first have to an XML file (on disc or in-memory), right?
But cannot get the file if I don't known where the file ends. For example,
if I am getting the following stream of data:
<?xml version="1.0" encoding="utf-8"?><Root><Name>Apple</Name></Root><?xml
version="1.0" encoding="utf-8"?><Root><Name>Orange</Name></Root>

I need to be able to read: <?xml version="1.0"
encoding="utf-8"?><Root><Name>Apple</Name></Root>
out of that stream and convert it to an XML file (in order to use DTD or
schema validation), and continue with the rest of the stream.

I CAN do this by sending "<EOF>" right after both </Roottags, but I was
wondering if there is an XML standard that I can use instead of "<EOF>".

Thanks
Goran Djuranovic
"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Goran Djuranovic" <go**************@newsgroups.nospamwrote in
news:uM*************@TK2MSFTNGP02.phx.gbl:
>I have an VB.NET application the is sending XML files over TCP. I
would like to know if there is a standard syntax for signaling the
"end-of-file" for XML. I know I could concatinate whatever, but am
looking for a standard, if it exists.

End of file is determined by your file schema.

You can use a DTD to validate if the file was transferred succesfully.

Nov 15 '06 #3

P: n/a
Hello Goran
I need to be able to read: <?xml version="1.0"
encoding="utf-8"?><Root><Name>Apple</Name></Root>
out of that stream and convert it to an XML file (in order to use DTD or
schema validation), and continue with the rest of the stream.

I CAN do this by sending "<EOF>" right after both </Roottags, but I was
wondering if there is an XML standard that I can use instead of "<EOF>".
there is no signaling known for XML. A solution of MacroMedia with Flash
is to send a 0 or 1 byte/char as terminator for the XML content, in case
this
characters are not allowed in XML. You can do the same with the <EOF>
for your communication.
Regards

Holger
Nov 15 '06 #4

P: n/a
"Goran Djuranovic" <go**************@newsgroups.nospamwrote in
news:#X**************@TK2MSFTNGP04.phx.gbl:
To use DTD I first have to an XML file (on disc or in-memory), right?
But cannot get the file if I don't known where the file ends. For
example, if I am getting the following stream of data:
<?xml version="1.0"
encoding="utf-8"?><Root><Name>Apple</Name></Root><?xml version="1.0"
encoding="utf-8"?><Root><Name>Orange</Name></Root>
Do you know the schema - or is the file format unknown? You could define
the terminator as part of your file format (i.e. <file>....</file>)

Or, I believe if you load an incomplete/invalid file into an XML
document... it will throw an error.
Nov 15 '06 #5

P: n/a
Or, I believe if you load an incomplete/invalid file into an XML
document... it will throw an error.
it is a fact :-)
regards

Michel Posseth [MCP]
"Spam Catcher" <sp**********@rogers.comschreef in bericht
news:Xn**********************************@127.0.0. 1...
"Goran Djuranovic" <go**************@newsgroups.nospamwrote in
news:#X**************@TK2MSFTNGP04.phx.gbl:
>To use DTD I first have to an XML file (on disc or in-memory), right?
But cannot get the file if I don't known where the file ends. For
example, if I am getting the following stream of data:
<?xml version="1.0"
encoding="utf-8"?><Root><Name>Apple</Name></Root><?xml version="1.0"
encoding="utf-8"?><Root><Name>Orange</Name></Root>

Do you know the schema - or is the file format unknown? You could define
the terminator as part of your file format (i.e. <file>....</file>)

Or, I believe if you load an incomplete/invalid file into an XML
document... it will throw an error.

Nov 26 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.