Actually, I did thought about using libxml but I couldn't figure how to retrieve the date.
I surely can use some help on how to walk the tree.
for instance, how can print the main node value/count followed by it's children's values/counts.
Please, see the following sample output...
Thanks cpjust.
and yes, it's a big mess.
well, the input looks like the sample in my previous post (v4 sample).
the following is a sample output:
200602,3122,000-005,305,U,4
200602,3122,000-005,305,M,57
200602,3122,000-005,305,I,5
200602,3122,000-005,305,F,220
200602,3122,000-005,305,C,1...
hello there;
I need to re-arrange data for a report.
Currently I've read the data into a vector and data is grouped by date and dollar_range. Each line stores a type and it's count:
gender_1, count
gender_2, count
gender_n, count
dollar_range_1, count
.
.
gender_1, count
gendeer_n, count...
I appreciate your help guys.
I can't use libxm++ right now. I requested its install but the admin guys wont do it. So, I've no choice but to use what I got.
I can't use
That been said, I still need your help guys...
thanks again.
daula
#include <iostream>
#include <sstream>
#include...
Hello everyone;
I'm trying to extract data from xml files.
at the moment I have two set of xml files that are two and three levels deep respectively.
1st:
-state
-date_range
2nd:
-date
-dollar_range
-gender
In the first instance, I would like to grab all the date_range (value...
Thank PHV
although awk complained "unterminated regexp" and "unexpected newline".
i mananged to fix it tho...
$0~":name=\""vName"\">"/{++r;next}
thanks again for lead/tip
daula
hello again;
i have another variable related question...
in the "sub" file (mentioned in my previous post), i have an search/action like:
/:name="cState">/{++r;next}
now, i'm wondering is there a way i can pass "cState" or even the whole search string ":name="cState"" as a variable?
many...
hi everyone;
i want to take a shell variable and pass it to the -f (external file) option of awk.
i have tried a couple of ways and neither works.
btw, the reason i'm trying to achieve this is because for every input file there is an associated awk file (e.g IDA1.xml is associated to IDA1.sub...
hello everyone;
i'm back again...
as for right now the script works like a champ with M(ales) and F(emales) params but not with the Unknowns.
actually, the Unknowns are just alittle off because there're some few Unknowns that have numeric 'value's. so, i tried to modify the regex for Unknowns to...
Good morning;
Thanks... I really appreciate your help.
Your script works but only and only if there is only one Gender value (i.e value>M)... but in my xml every 'currdollar' can have mutiple Gender values.
for instance;
I could have the following:
within the 000-005 'currdollar' of 200602...
I'm very sorry about that... the output was generated using xslt and xsltproc. You're right the output for the second line is all wrong.
However, the data in the xml is correct.
thanks again
daula
the main reason is that awk performances way better than xslt and xsltproc combo. i had done some transformation using xslt that were taking nearly 3 min to spit the output (even after rigorous tweaking) but when i did the same transform in awk (my very first post), it took 2 secs or less.
all...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.