Well, thing is, I don't know how to pick it up,
I have a xml file, I'll write part of it:
And so, on, it also has the Bills for the stuff that is bought, and then you print a receipt when it is paid.Code:<pos>
<company>Company X</company>
<tax>1.21</tax>
−
<suppliers>
−
<supplier>
<id>1</id>
<name>BlaBla Lda.</name>
<number>501031034</number>
<suppliers>
<clients>
−
<client>
<id>1</id>
<name>John Doe</name>
<number>124124124</number>
</client>
</clients>
<products>
−
<product>
<ref>ABC9T</ref>
<description>Monitor ABC 19</description>
<cost>100.00</cost>
<pvp>200.00</pvp> <!--With tax-->
<amount>0</amount>
</product>
So, my question is..
I can just go and do:
And, how to insert the said client, how do I:Code:struct client {
char name[50+1]; /* I'm unsure whether to put the * pointer or not, since there is a mode in which you can create a new client */
int id, number[9+1];
struct client *next;
};
typedef struct client CLIENT;
1) Find the end of the the <clients>? With an fscanf, which will look for </clients> and write immediatly before? If so, how do I do "that".
2) Write with the tags already?, Like, with a mention of a scanf, which will ask for the name, and the number, and then a fwrite, that will go likeCode:fwrite
<client><name>%c</name>, client_name

