Looking for a samaritan
Results 1 to 5 of 5

Thread: Looking for a samaritan

  1. #1
    Member
    Join Date
    Oct 2003
    Posts
    81

    Looking for a samaritan

    I have a problem and hope someone can help.

    I have an XML document and need to extract the data from it .

    The ideal solution would be for the data within the XML to be extracted and inputed into a excell spreadsheet. As I receive several XML documents a day I would Ideally like each extraction to be added after the next ( ie I extract xml document A and it puts into a spreadsheet , then when I extract XML document B the data from then is extracted and added below the data from document A and so on).

    I believe this should be pretty easy and simple for a coder , if anyone can write the needed code for me , I would be ever so gratefull as I don't know how to program. Any language would be fine.

    If anyone is willing to give it a go then please PM me,

    Thanks

  2. #2
    Super Moderator: GMT Zone nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,178
    Once again some more questions:

    1. Do you want the entire document, or just parts of it? (fields)
    2. Are the documents all of the same length and format?
    3. Can you provide two examples.......they don't have to be real, just realistic as to data type (numeric, alpha, alphanumeric) and length/layout.

    The solution might be as simple as just importing them into Excel/Access or writing an update query. Sometimes you can do this with just the native GUI, otherwise there is a bit of VBS "tuning" required (yeah, I know......redundant, but I didn't develop MS office )
    If you cannot do someone any good: don't do them any harm....
    As long as you did this to one of these, the least of my little ones............you did it unto Me.
    What profiteth a man if he gains the entire World at the expense of his immortal soul?

  3. #3
    Senior Member Aardpsymon's Avatar
    Join Date
    Feb 2007
    Location
    St Annes (aaaa!)
    Posts
    434
    last time I did anything to do with coding for XML I ended up using c#. It has some nice libraries for dealing with XML.

    easiest output would just be to a CSV file, easy to append to and openable in excel. Of course, if you want to take this data and do excel stuff to it you can't save it in CSV format.

    An easier option might be make something that converts your XML to CSV and then copy and paste to the bottom of your existing document.

    </my two pence>
    If the world doesn't stop annoying me I will name my kids ";DROP DATABASE;" and get revenge.

  4. #4
    Old-Fogey:Addicts founder Terr's Avatar
    Join Date
    Aug 2001
    Location
    Seattle, WA
    Posts
    2,007
    I've got an XML-to-CSV php class (for a virtually tabular XML format) floating around somewhere, along with a "combine CSVs" script. Would those help?

    They're scars from fighting with a Multiple Listing Service data feed. At least it wasn't biomedical data. <shiver>
    Last edited by Terr; March 2nd, 2007 at 09:30 PM.
    [HvC]Terr: L33T Technical Proficiency

  5. #5
    AO Guinness Monster MURACU's Avatar
    Join Date
    Jan 2004
    Location
    paris
    Posts
    1,002
    Here is a page with a VBS script that nearly does what you want. Warning I havn't tested the script so be carefull about using it. http://www.codeproject.com/vbscript/xml2csv.asp . I would sugest you check out microsoft script page for other examples if you want to go with VBS.
    Cheers
    Last edited by MURACU; March 5th, 2007 at 01:45 PM.
    \"America is the only country that went from barbarism to decadence without civilization in between.\"
    \"The reason we are so pleased to find other people\'s secrets is that it distracts public attention from our own.\"
    Oscar Wilde(1854-1900)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides