AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  BASH XML Parser compatible with AIX 7.2

    Posted Fri October 26, 2018 02:59 PM

    Originally posted by: pharryr


    I have need to parse an XML properties file in BASH scripts on AIX 7.2

    Does anyone know of a library that can be installed on AIX 7.2 that does XML parsing and work in BASH?

     



  • 2.  Re: BASH XML Parser compatible with AIX 7.2

    Posted Sat October 27, 2018 03:49 AM

    Originally posted by: sangameshm


    You can use xmllint from the libxml2 rpm package.

    You can download and install libxml2 rpm package from the AIX Toolbox https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html#L

    Lots of resources available in google on how to use xmllint in bash. https://stackoverflow.com/questions/43870622/bash-extract-xml-attribute-value-using-xmllint

     

    Thanks,

    Sangamesh



  • 3.  Re: BASH XML Parser compatible with AIX 7.2

    Posted Wed October 31, 2018 08:09 AM

    Originally posted by: pharryr


    xmllint is working great.  Thanks.



  • 4.  RE: Re: BASH XML Parser compatible with AIX 7.2

    Posted Tue July 26, 2022 04:06 PM
    HI 

    I tried to install libxml2 but getting dependency error . 
    # rpm -ivh libxml2-2.9.14-1.aix6.1.ppc.rpm
    error: Failed dependencies:
    libgcc >= 8.3.0 is needed by libxml2-2.9.14-1.ppc
    libiconv >= 1.16 is needed by libxml2-2.9.14-1.ppc
    libiconv.a(libiconv.so.2) is needed by libxml2-2.9.14-1.ppc
    liblzma.a(liblzma.so.5) is needed by libxml2-2.9.14-1.ppc
    xz-libs >= 5.2.4 is needed by libxml2-2.9.14-1.ppc
    #




    ------------------------------
    Avaya Kumar Mohanty
    ------------------------------



  • 5.  RE: Re: BASH XML Parser compatible with AIX 7.2

    Posted Tue July 26, 2022 07:03 PM

    Ah, the joy of rpm dependencies

    if you have YUM or DNF, that may save you some time.

    Download those dependencies from your favorite repository.

    I'd recommend starting with ibm-toolbox, they've put in some effort to get everything updated.

    load all that you need into a single directory, and run rpm -ivh *

    then rinse and repeat with new dependencies that pop up



    ------------------------------
    Tom McGivern
    ------------------------------