473,545 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML parsing - question about PI's

I'm trying to make sort of a simple template system using XML.
Imagine the following xml code:
<page>
<header>...</header>
<body>
<title>My News</title>
<?news to_list 10?>
</body>
</page>

First of all the xml should be parsed and the PI about the news should be
executed. This PI gives back some more XML code that should be placed in
the original document to replace the PI.
How do I get this result?
I'm thinking parsing it with a sax and just echo'ing all the tags and
attributes again is not an elegant solution.
But it's the only way I see...

Anyone any ideas?

--
Rutger Claes
Jul 16 '05 #1
0 1760

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

Similar topics

10
1875
by: george young | last post by:
For each run of my app, I have a known set of (<100) wafer names. Names are sometimes simply integers, sometimes a short string, and sometimes a short string followed by an integer, e.g.: 5, 6, 7, 8, 9, bar, foo_6, foo_7, foo_8, foo_9, foo_10, foo_11 I need to read user input of a subset of these. The user will type a set of names...
8
2825
by: john smith | last post by:
I have a question about the best way to use constants in C++. There seem to be variations in the way that they are used, and I am confused as to what I should be using. Basically since the constant is used in only one class, should I try to scope it to just that class? to the file? what are the thoughts out there. 1.) I have seen...
4
6178
by: Rakesh Sinha | last post by:
I am having this code here. static const float PI = 3.14159; static const float INC = 0.4f * PI; When I compile my program, I get the following error, error: `MyClass::PI' cannot appear in a constant-expression .
7
1880
by: Bala L | last post by:
I have a class with a private array data member 'm_array'. I have written a public function, called 'fileRead', to read values into the array from a file. I just noticed that I have declared this function to be const. I dont understand how the code compiled and executed without returning an error or a warning. I am assigning values from a...
5
9668
by: confusedprogrammer | last post by:
I am doing a program for a class of mine. I have figured out how to display the final result of PI but i have not figured out how to print the part where is ask me print out Pi after a certain number of steps. This is what the assignment says: After a valid number of terms has been entered, input from the user a display count representing how...
123
4196
by: Lane Straatman | last post by:
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <complex.h> /* double complex z1, z2, z3; bool flag; z1 = .4 + .7I; z2 = cpow(z1, 2.0); z3 = z1 * z1;
1
1722
by: chixor1 | last post by:
I have been charged with Parsing the data from many Abstract files, and then inputing this information into a SQL Database. The file format is rather unusual and certainly not delimited in any reasonable fashion. I was wondering if anyone would be able to assist or provide an idea of how I may go about parsing this data for insertion. The...
2
1762
by: xianwei | last post by:
First, typedef struct pair { Node *parent; Node *child; } Pair; static Pair SeekItem(cosnt Item *pI, const Tree *pTree) { Pair look;
17
3174
by: pyramid | last post by:
Hello I am working on one of my lab for this week, which calculates the approximate value of pi. Listed below is the actual problem, which I am posting here, so that you can see the different requirements for the program. The program is simple. I used the ‘for loop’ to define the number of increments, then set up a formula to calculate...
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7943
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6022
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...
1
5359
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...
0
5076
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...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.