Home All Groups Group Topic Archive Search About
Author
15 Nov 2006 4:02 PM
Goran Djuranovic
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

Author
15 Nov 2006 4:10 PM
Spam Catcher
"Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in
news:uMpI69MCHHA.144@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.
Author
15 Nov 2006 4:36 PM
Goran Djuranovic
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 </Root> tags, but I was
wondering if there is an XML standard that I can use instead of "<EOF>".

Thanks
Goran Djuranovic


Show quoteHide quote
"Spam Catcher" <spamhoneypot@rogers.com> wrote in message
news:Xns987C71A6F20C5usenethoneypotrogers@127.0.0.1...
> "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in
> news:uMpI69MCHHA.144@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.
Author
15 Nov 2006 6:40 PM
Holger Boskugel
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 </Root> tags, 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
Author
15 Nov 2006 7:44 PM
Spam Catcher
"Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in
news:#XzoxQNCHHA.3380@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.
Author
26 Nov 2006 7:35 AM
Michel Posseth [MCP]
> 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]


Show quoteHide quote
"Spam Catcher" <spamhoneypot@rogers.com> schreef in bericht
news:Xns987C95DEF2B92usenethoneypotrogers@127.0.0.1...
> "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in
> news:#XzoxQNCHHA.3380@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.