Trying to write a filter
-
I have an XML document which I need to turn into a new format, where a small portion of it gets put in tags, the rest does not. There is a LOT of XML on this page. I've got the first half done, easy enough. Now I want to write a filter which, instead of saying 'include these tags and children', I want to say 'EXCLUDE these tages and children, include everything else'. How do I do that ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
-
I have an XML document which I need to turn into a new format, where a small portion of it gets put in tags, the rest does not. There is a LOT of XML on this page. I've got the first half done, easy enough. Now I want to write a filter which, instead of saying 'include these tags and children', I want to say 'EXCLUDE these tages and children, include everything else'. How do I do that ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
Which language and parser are you using to process the XML?
-
Which language and parser are you using to process the XML?
I'm using XSL, I got it working this afternoon - thanks. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
-
I'm using XSL, I got it working this afternoon - thanks. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
Christian Graus wrote: I got it working this afternoon - thanks. How did you do it? I might run into that problem one day and need to know how, thanks :) regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
-
Christian Graus wrote: I got it working this afternoon - thanks. How did you do it? I might run into that problem one day and need to know how, thanks :) regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
My first pass would have been to use the count(tag) function and only processed if it returned 0. Good ideas are not adopted automatically. They must be driven into practice with courageous patients. -Admiral Rickover. ...
-
Christian Graus wrote: I got it working this afternoon - thanks. How did you do it? I might run into that problem one day and need to know how, thanks :) regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
The trick is that a more generic filter will only include items that were not included in a more specific filter. I wrote specific filters for the tages I needed, then a generic filter, and it excluded all the items that the specific tags caught. If that's not clear LMK, I can post the code from work tomorrow. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002