473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

nonblocking read of one xml element?

mh
So, I'm parsing a log file that's being written out in
real time.

<logfile>
<entry><timestamp>123</timestamp><details>foo</details>
</entry>
<entry><timestamp>456</timestamp><details>bar</details>
</entry>
<--- no </logfile>, coz the file hasn't yet been closed

This is part of an event loop, so I want to have some code
that looks like this:

when logfile is readable:
read one <entrynode, including children
but don't try to read past </entry>, so that
the read won't block.

Any clues greatly appreciated,
Many TIA!
Mark

--
Mark Harrison
Pixar Animation Studios
Feb 5 '08 #1
0 911

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: KimTaehwan | last post by:
I want to be throw exception when one thread wait to read no data from a remote source for long time. This can be done in pre-1.4 enviroment like the following. ...
1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
1
by: Peter Ammon | last post by:
I would like to read from a pipe in which data may arrive slowly. From experimenting, it looks like os.read() will block until it returns the maximum amount of data you asked for, in the second...
3
by: jason | last post by:
i am using an XMLValidatingReader in a manner similar to the following code example: string sReturn = ""; XmlValidatingReader oXML = new XmlValidatingReader(sXMLString, XmlNodeType.Document,...
1
by: David Dvali | last post by:
Hello. What is nonblocking sockets and how can I ues it? Can you show me some seamlpe please?
2
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine...
2
by: David Helgason | last post by:
I was just wondering whether this was either: - supported, or - doable, either - using the normal poll-read-done? loop - a settable timeout It would be awfully nice. David Helgason, Over...
3
by: noswitchport | last post by:
Hi, I used C to write simple "udp" (not tcp) socket programming. The client will send the string to the server and server will just echo that string back to client. Everything went fine until I...
4
by: rdabane | last post by:
Hi, I'm trying to perform following operation from inside the python script 1. Open a shell ( start a process ) 2. Send command1 to the process 3. Get output from the process 4. Send command2...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.