How do I install XML::LibXML for ActivePerl?

I am new to Perl and I am using ActivePerl. I am getting the following error: Can't locate XML/LibXML.pm in @INC... I have tried everything but cannot find the steps to install the "correct"...

How can I easily test if XML file is well-formed in Perl?

I know there are quite some threads talking about validating XML file against its XML schema, such as : validate-xml-using-libxml and xml-schema-validation-with-relaxng So if there is a simple...

How to work with XML files in Perl?

I need to get the child node data values of nodes with a given name in an XML file, using a Perl script. I am using XML::LibXML::Simple. A code snippet is shown below: my $booklist =...

Perl XML::DOM::Parser

I'm trying to get som information from a RSS feed usin perl, XML::DOM and XML::Parser. I'm having a hard time getting som documentation on XML::DOM and XML::Parser :( This is the rss feed...

parse a XML, and find and replace only the values in nodes whose name matches a regexp (at any depth within the XML)

I need to find specific names (ie, a few names matching several regexp) and for each hide their corresponding values, wherever they appeared in the xml By using a XML parsing library (Twig? libXML...

XML manipulation using perl

Hi i have been trying to work with XML manipulation using perl ( i have tried XML::LibXML, XML::Twig and XML::Simple) but i couldnt read it. I think it might be because of my file. an example of...

xml same tag name on different levels

I am trying to parse an xml document using Perl XML::LibXML::reader module . The module works well and i was able to parse most of the document ,but there are sections on the xml which could have...

Segmentation fault on merging threads (Perl)

I had some working code that I've tried to multithread using the tutorial on dreamincode: http://www.dreamincode.net/forums/topic/255487-multithreading-in-perl/ The example code there seems to...

useful set of cookbook examples of perl xml::libxml dom parser for (x)html?

the authors of some simpler perl dom parsers for xml seem to discourage their use for mixed content in favor of XML::LibXML. so I am now beginning to learn XML::LibXML and am looking for cookbook...

Perl, "Can't locate object method "new"

I have some perl code that runs great on my Mac. I moved it to a client linux box and I'm getting an error when trying to use XML::Simple: #! usr/local/bin/perl5 #use strict; #use warnings; use...

How to add all tab completitions to my current command?

So I've typed a command (pacman -S perl-) and I hit tab and see that there are a whole bunch of completions (about 40), and I realize that I want to run every single completion (so I don't...

How to write HTML tags in Perl using LibXML

I'm using LibXML to read/write an Android strings.xml file. Sometimes, I need to write html elements such as <b> or <i>. I've tried doing something like this (for example): #!/usr/bin/env...

perl libxml writing xliff in strings.xml

I'm having difficulty writing to a strings.xml file that contains an XLIFF element using LibXML. Note that I'm trying to write a value that already exists (had no problem parsing the node while...

Changing code from using XML::XPath to XML::LibXML

I have a perl script working fine. Script is taking an xml file as input and returning a JSON format of same and also value of a specific element within XML file. #!/usr/bin/perl use strict; use...

converting the tag names in JSON to follow CamelCase notation

I am having a JSON like following : { "Person": { "IDCountry": "0", "Home": { "ID": "ABC-XYZ", "Laptop": { "FileName":...

changes needed to install Webmin on a server running Gentoo

I'm trying to setup a www.kimsufi.com server running Gentoo and to install Webmin to administrate it. I used the command : emerge webmin and it returned : !!! Found 2 make.conf files, using...

Replace XML node with String in Perl using LibXML

I'm currently using a perl script with LibXML to process a given XML file. This goes decently well, but if I have a node with both child nodes and free text, I begin to struggle. An example input...

Make XML::Simple read external DTDs

Given the below two files: doc.xml <!DOCTYPE TEST [ <!ENTITY % get_em SYSTEM "entities.ent" > %get_em; ]> <TEST> ...

Force perl XMLin to treat an empty tag as empty string?

Having the following: perl -MXML::LibXML::Simple -MData::Dumper -E '$h=XMLin("<some><bubu>string</bubu></some>");say Dumper $h' is parsed as: $VAR1 = { 'bubu' => 'string' ...

How to print UTF-8 correctly using XML::LibXML

I wrote a script which converts a hash into an XML and returns the result of the toString function from XML::LibXML::Document. It seems impossible for me to print the result (the string) without...

perl fetchrow_array returning only the last column instead of all of the columns

I'm working on a script called "hlstats.pl" which is a stats server from Half-Life game from http://www.hlstats-community.org/ I'm trying to run this on Strawberry perl on Windows with MySQL. I've...

XML::LibXML and namespaces

I'm familiar with XML, having put it to some simple uses. However, I've been requested to create a custom solution (that must use Perl) for submitting payments to AuthorizeNet's gateway. AuthNet...

"Too late for "-C" option" error With Perl and Shell scripts

I have a jar application that has several functions, one of which is to convert from HTML to XML. When I try to run a simple command such as: java -jar lt4el-cmd.jar send -l en...

Jenkins build job fails while installing a package

I'm working on a Jenkinsfile that should be able to perform e2e-Tests with protractor befor deployment. So i need to install several packages for a chrome-headless installation (Yes, I've checked...

Can't locate XML/Simple.pm

perl -e 'use XML::Simple" And get error "Can't locate XML/Simple.pm" Then I installed XML:: Simple or Xml::Simple using sudo perl -MCPAN -e 'install XML::Simple' I also did this sudo apt-get...

Perl libXML search the default namespace using findnodes

Given a XML file with multiple namespaces defined, what is the simplest way to search the DOM for elements just in the default namespace using an XPath query? As the title suggests this is using...

Perl: parse SVG file

I want to parse an SVG file in Perl, but I see advice NOT to use certain libraries (XML::Simple, XML::XPath) for different reasons. The thread below suggests...

Can't locate object method setData - save value in XML file

I have simple XML like this. <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <TCXML format="low_level" authKey="12345"> <Dataset acl_bits="0" creation_date="2019-04-03T13:42:47Z"...

How can I parse multiple xml-files into one DOM object using perl XML::LibXML?

I want to parse multiple xml-files into one DOM object, using the perl module XML::LibXML. I have an xml-file containing the filename of other xml-files to parse. If somehow possible, I would...

NPM requires x11 during installation via apt

I running Ubuntu server 20.04 and i need to install npm. But when i run "apt install npm" i see x11 packages in requirements. The following NEW packages will be installed: gyp javascript-common...