• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Generate many XML files"

Collapse

  • veroli
    replied
    powershell

    here is a simple little powershell script to do something close to what you want.
    save it as .ps1 file and execute it or just paste the lot into a powershell console window.
    it will write the files to your current directory so make sure you have permission and also make sure you have set your execution policy.
    its easily changeable to add all the xml into you want

    Code:
    $array  = 1..100
    foreach ($element in $array){
    "<Tag1>Some XML</Tag1>`r`n<Tag2>More XML</Tag2>" |out-file "file_$element.xml"
    }

    Leave a comment:


  • b0redom
    replied
    What UnixMan said. ^

    Leave a comment:


  • unixman
    replied
    Perl was designed specifically for this kind of thing.

    Leave a comment:


  • Weltchy
    replied
    Notepad

    Leave a comment:


  • Bacchus
    replied
    You can do this with almost any programming language or scripting language.

    in a simple case you could even do it with text in excel.

    Leave a comment:


  • DimPrawn
    replied
    Pretty vague request.

    What is the source data?

    When you say variations, do you mean variations of the data or variations of the structure?

    Leave a comment:


  • VectraMan
    replied
    If it's Windows then I'm pretty sure you can do it with VBScript with Windows Scripting Host.

    Leave a comment:


  • RSoles
    replied
    Sounds like the sort of thing a python script should handle.

    Leave a comment:


  • WTFH
    replied
    Have you already got the schema and data, or are you supposed to be mocking up an output?

    Leave a comment:


  • LondonManc
    replied
    Depends what your starting point is.

    If you've got access to SQL Server you could write a cursor with a stored procedure call.

    Leave a comment:


  • anthony
    started a topic Generate many XML files

    Generate many XML files

    Hi guys,

    Wondering if any one out their has a solution to my query... I need to generate many (100+) variations of an XML file and was wondering if their is any tool (freeware) out there that you can use - was thinking of doing it in VBA(?)

Working...
X