|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XML over TCPHi 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 "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in End of file is determined by your file schema.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. You can use a DTD to validate if the file was transferred succesfully. 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. Hello Goran
> I need to be able to read: <?xml version="1.0" there is no signaling known for XML. A solution of MacroMedia with Flash> 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>". 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 "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in Do you know the schema - or is the file format unknown? You could define 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> 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. > Or, I believe if you load an incomplete/invalid file into an XML it is a fact :-)> document... it will throw an error. 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. |
|||||||||||||||||||||||