473,698 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to parse a incomplete xml file

11 New Member
I have to write a program where we get the xml file incrementally. i.e the file is constantly updated in the form of xml feed. Thus the first chunk will not be a well formed xml document. However i need to parse the feeds regularly and display the parsed result.

How can this be achieved.?

Eg...

xml field can be following

First chunk is as follows: We can see it is not well formed
Expand|Select|Wrap|Line Numbers
  1. <xml> 
  2. <results> 
  3. <result1> 
  4. </result1? 
  5. <result2> 
  6. </result2> 
The next chunk will be

Expand|Select|Wrap|Line Numbers
  1. <result3> 
  2. </result3> 
  3. <result4> 
  4. </result4> 
  5. </results> 
  6. </xml> 
Please help!! I would be greatful if you could provide me with sample code or some links which i can follow.

TIA
Jan 13 '09
11 8369
jkmyoung
2,057 Recognized Expert Top Contributor
What language are you using to do this? You would be better asking the streaming question in the specific language forum, (eg Java? C++?).

You will need to specify exactly how you are getting these file fragments, specifically what format/class they are in, and the type of Stream or Reader class you want to end up with.
Jan 14 '09 #11
praveenss
11 New Member
@jkmyoung
I am using C language!
Jan 15 '09 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

10
590
by: Stuart Rogers | last post by:
I have just setup my website with a new linux hosting service. I have copied over my scripts and the jpgraph (the stable version) files from my working local lan linux server. The hosting service runs PHP 4.3.9 and I keep getting parse errors like this- Parse error: parse error, unexpected '=' in /home/fhlinux199/s/mydomain.org.uk/user/htdocs/jpgraph/jpgraph.php on line 1100 when I look at the content of jpgraph.php it is just fine
7
2587
by: Nova's Taylor | last post by:
Hi folks, I am a newbie to Python and am hoping that someone can get me started on a log parser that I am trying to write. The log is an ASCII file that contains a process identifier (PID), username, date, and time field like this: 1234 williamstim 01AUG03 7:44:31 2348 williamstim 02AUG03 14:11:20
4
2954
by: oliver.lin | last post by:
In my simple test code, I tried to define my constructor outside of the class declaration headr file. The header file: file_handler.h ============================================================ 1 #include <string> 2 using namespace std; 3 class file_handler 4 { //Declare member variables 5 private: 6 string file_rd, file_wr; //Define the file name for read
2
4979
by: Vittal | last post by:
Hello All, I am trying to compile my application on Red Hat Linux 8 against gcc 3.2.2. Very first file in application is failing to compile. I tried compiling my application on Linux 7.2 against gcc 3.1 and it got build without any problems. However on against gcc 3.2.2 I hitting this error:
2
2815
by: Mauricio Correa | last post by:
Hello, i try to consume a java web service from a asp .net page, i make without problems the web reference tu wsdl file http://machine/WebService/nameWebService?WSDL in the asp .net page put the code Dim WSConection As New WebService.nameWebService Dim XML_= WSConection .getCcompleteSis(TextBox1.Text) 'this return a string with a XML
2
1874
by: Jan | last post by:
In a 2-page order form, not all applicants will complete it due to field validations. If I want to see data from incomplete orders, can this be done using some sort of session control so that each form page data saved (each press on submit will save data to disk) will have a session number attached to it? Thus if the order log contains several line entries from submit attempts, then I can locate the lines that belongs to the same order...
10
3194
by: Michael B. Trausch | last post by:
Alright... I am attempting to find a way to parse ANSI text from a telnet application. However, I am experiencing a bit of trouble. What I want to do is have all ANSI sequences _removed_ from the output, save for those that manage color codes or text presentation (in short, the ones that are ESChttp://fd0man.theunixplace.com/Tmud.tar which contains the code in question. In short, the information is coming in over a TCP/IP socket that...
29
2889
by: gs | last post by:
let say I have to deal with various date format and I am give format string from one of the following dd/mm/yyyy mm/dd/yyyy dd/mmm/yyyy mmm/dd/yyyy dd/mm/yy mm/dd/yy dd/mmm/yy mmm/dd/yy
50
4482
by: Juha Nieminen | last post by:
I asked a long time ago in this group how to make a smart pointer which works with incomplete types. I got this answer (only relevant parts included): //------------------------------------------------------------------ template<typename Data_t> class SmartPointer { Data_t* data; void(*deleterFunc)(Data_t*);
5
2399
by: praveenss | last post by:
I have to write a program where we get the xml file incrementally. i.e the file is constantly updated in the form of xml feed. Thus the first chunk will not be a well formed xml document. However i need to parse the feeds regularly and display the parsed result. How can this be achieved.? Eg... xml field can be following First chunk is as follows: We can see it is not well formed <xml>
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7743
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.