Login | |
|
 |
RE: XML to CSV in VBScript - 9/19/2005 6:24:03 PM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
Please don't get me wrong. It's not that I don't want to help but I have the feeling I'm answering the same questions over and over again. Each time with a minor difference, but things I think you should be able to find out yourself. Or you should read the documentation more attentively and make some test scripts to try everything out or you could tell me exactly what your project is, what the script has to do with an example of the real XML file and I'll write the script for you. Then you can try to understand what it does and ask questions about the provided code. To give you a start with your last question, you can either use the selectSingleNode and build the XPaths dynamically to go through the complete tree of nodes or you could do something similar with node lists (= collections) and check within these list seach node and/or childnodes.
|
|
| |
|
|
|
 |
RE: XML to CSV in VBScript - 9/19/2005 7:07:13 PM
|
|
 |
|
| |
reloader
Posts: 72
Score: 0
Joined: 9/5/2005
Status: offline
|
Okay, U are right. I 'm writing a script, what is convert an XML file. From: <Album ref="CD720" category="Pop"> <title>Come On Over</title> <protocols/> </Album> To: <Album> <ref>CD720</ref> <category>Pop</category> <title>Come On Over</title> <protocols/> </Album> It's done. Now, I don't have to handle Attributes, but Nodes. After I want a loop, that is look over in each <Album></Album> for each nodes like "ref", "category", "title", "protocols". If a node doesn't exist(for instance <Year>) , the script should be recognize it, and give me a value or a text or something. Important. the loop have to go row by row, beacuse it will be a CSV format at the end. Sorry for my many silly question, but I do Object-Orientated programming first time in my life, and a bit complicate me for the present.
|
|
| |
|
|
|
 |
RE: XML to CSV in VBScript - 9/23/2005 3:10:48 AM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1140
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: online
|
Wow. I am really impressed by your patience and willingness to go the extra 15 miles to help out a stranger, Zifter. No sarcasm, irony, or joking around on my part. Just honest respect. I don't think... no, I *know* that I couldn't stick with it this long.
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
|
|
| |
|
|
|
 |
RE: XML to CSV in VBScript - 9/23/2005 7:53:00 PM
|
|
 |
|
| |
Snipah
Posts: 1341
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
Hiya Reloader, Please share with us the complete resolution that you have... include the XML file where you run the code on, the code itself, and the output, please.... that would be a nice closure of this thread....
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
|
|