I've read the w3c xml recommandation and I've tried to
figure out what is called a root element. Is a root
element my tag <Mesures> ?
If yes, I printed out all the elements that were
parsed  and I saw all the tags described in my
previous message.
I made a typo error in my previous mail the tag
<Disk...> is not ended by a "/".

When exactly should I flush the buffer ?

Thank you for helping me.

Vincent


 --- Christopher Ebert <[EMAIL PROTECTED]> a �crit
: > 
>       Hi,
> 
>       I've seen this error when I have no root element at
> all, or I
> think when I've had two 'root' elements (I'm using
> 1.4.4). Can you watch
> the raw data read from the socket? Are you really
> getting what you think
> you're getting before it closes? Maybe there's a
> missing 'flush'?
> 
>       Chris
> 
> 
> -----Original Message-----
> From: vincent doyelle [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 16, 2002 1:35 PM
> To: [EMAIL PROTECTED]
> Subject: What does it mean : "The root element is
> required in a
> well-formed document"
> 
> 
> Hi all
> 
> I've got a problem using a parser to parse a stream
> coming from a socket over the network.
> I'm using 2 applications, one is the sender and is
> writing xml things on the socket output, after
> writing, yhe socket is closed.
> this socket output is created like this : 
> PrintWriter sortie = new PrintWriter(new
> OutputStreamWriter(incoming.getOutputStream()),
> true);
> I'm writing on the fly : like this
> sortie.print(...);
> 
> I've got the error "The root element is required in
> a
> well formed document".
> I can't see why because I've checked all my elements
> and they seems to be correctly nested.
> My "document" is formatted like this : 
> <?xml version="1.0"?>
> <Mesures>
> <Equipement ... />
> <Processeurs>
> <CPU ... />
> </Procsseurs>
> <Processses>
> <Process ... />
> </Processes>
> <Users>
> <User ... />
> </Users>
> <Memoires>
> <Memoire ... />
> </Memoires>
> <Disks>
> <Disk... />
> <Partitions>
> <Partition ... />
> </Partitions>
> </Disk>
> </Disks>
> </Mesures>
> 
> Have anyone an idea why I get this error ?
> 
> Thanks in advance
> 
> Vincent
> 
> 
> 
>
___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et
> en fran�ais !
> Yahoo! Mail : http://fr.mail.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to