[izpack-users] IzPack 3.8.1 - parsing an xml file

odb miraodb at hotmail.com
Mon Sep 18 18:13:12 CEST 2006


There's no such thing as an easy way to add element to an xml file once it's packed into the jar.

there's many ways to solve your problem i guess depending on your real need and knowledge.

For example, let's say you work on windows, you could use a simple vbscript or javascript to edit the xml and do whatever you want on it using the according methods... then package it to the installer and run it with the processpanel (in that case, you need to add processpanel to your structure, with its spec file AND you need to have the script + the xml itselves within a pack).

Of course all this is possible using shell script for Unix even though, you won't be able to use xml oriented methods but most likely some grep pipes and others would do the job !

Now, better, if you're ok with Java, you could create your own custompanel which would do anything you want. From editing the files, opening, renaming.... everything that is possible with Java :) So it's a lot !
For custom panel, you can checkout the docu in which there's a chapter for it. You can also look at the cookbooks which show some examples for it.

If you neeed further help, post some more details and we'll try to help you better.

  ----- Original Message ----- 
  From: Carmel Morrissey 
  To: 'izpack-users at lists.berlios.de' 
  Sent: Monday, September 18, 2006 10:59 AM
  Subject: [izpack-users] IzPack 3.8.1 - parsing an xml file

  To whom it may concern


  I am currently working with IzPack version 3.8.1.  


  Is there a utility that allows me to edit an xml file as follows?


  1.       Identify a particular tag element and append another tag after the close of the original tag

  2.       I want to add an attribute to an existing tag element


  I understand that I can use the 'parsable' element (parent element is 'pack') within the install.xml file.  However it appears that this will only work if I use it VariableSubstitutor.  I am not able to insert variables into the file for substitution since I do not deploy/own the file.


  For example:


  1.       Identify a particular tag element and append another tag after the close of the original tag

  After tag orion-application, I want to place a library tag element:



  <orion-application autocreate-tables="true" default-data-source="jdbc/OracleDS">



  <orion-application autocreate-tables="true" default-data-source="jdbc/OracleDS">

  <library path="../lib" />


  2.       Add an attribute to an existing tag element

  Insert attribute taskmanager-granularity into tag application-server



  <application-server application-directory="../applications" deployment-directory="../application-deployments" connector-directory="../connectors">



  <application-server taskmanager-granularity="60000" application-directory="../applications" deployment-directory="../application-deployments" connector-directory="../connectors">


  Any ideas on how to do this would be gratefully appreciated.





  izpack-users mailing list
  izpack-users at lists.berlios.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060918/83a5a58f/attachment.html 

More information about the izpack-users mailing list