Are there any XML plugin (content .WDX)?

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
thew42
Junior Member
Junior Member
Posts: 2
Joined: 2016-10-10, 12:30 UTC

Are there any XML plugin (content .WDX)?

Post by *thew42 »

I'm looking for an XML plugin where it would be possible to add a Custom Columns Mode where XML values within tags could be displayed. Does anyone know if there is such a plugin for Total Commander?

I think it would be very useful to have a custom columns mode where I could open a folder with multiple XML-files, and see the value for a certain XML tag amongst the usual columns (file name, size, date, etc.).

Very grateful for any replies to this matter. The reason why I looking for this plugin is that I would use that custom column, and use the TC-function "Copy to Clipboard with all details" and then create a list with the XML values, which I would then use in the TC Multi-Rename Tool to rename all XML files to file names based on value in a certain XML tag.
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2thew42
Try http://totalcmd.net/plugring/anyXML.html, but I don't know anything about this plugin and how it works....
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

Indeed, you could give anyXML a try.
Additionally, if your XML element (tag) in question is "unique", i.e. it will only appear once in the file or is at least surrounded by unique elements, and if you don't mind using Regular Expressions, then you could use my PCREsearch plug-in.

An expression could be

Code: Select all

<unique_tag>([^<]+)</unique_tag>
Replace String
$1
[x]First match string output

If you could describe your XML structure in more detail, I might provide you with a fitting expression for your task.


And BTW: no need to use "Copy to Clipboard with all details", as you can use WDX fields in MRT (Multi-Rename Tool) directly in the rename mask.
TC plugins: PCREsearch and RegXtract
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1008
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

AnyXML might work but it's 32-bit only.

I've been using AnyCmd with XMLStarlet. Learning the syntax of XMLStarlet can come in handy for other scripted XML querying or editing.

WinScript Advanced with PowerShell should work too.

For simple XML I guess PCREsearch might be easier as mentioned before.
thew42
Junior Member
Junior Member
Posts: 2
Joined: 2016-10-10, 12:30 UTC

Post by *thew42 »

Thank you all for your answers! I've successfully used PCREsearch for this purpose. But the AnyCmd-plugin (with XMLStarlet) was also a very useful tip - I see other very useful areas of usage with that method.
User avatar
silencer
Senior Member
Senior Member
Posts: 208
Joined: 2003-05-13, 13:18 UTC
Location: The Netherlands

Post by *silencer »

In my new config I'm trying to get this working again. It's working fine with PCREsearch in basis, but I'm missing some last config.

The field output is given when the file is .txt, but not when the file has xml extension. How can i get this to work for xml files? (or only xml files is even better)
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

silencer wrote:The field output is given when the file is .txt, but not when the file has xml extension. How can i get this to work for xml files? (or only xml files is even better)
Do you use the default PCREsearch configuration (besides the added search field)? XML files are filtered with the xdoc2txt.exe tool by default, which might cripple the output and therefore might miss a match. Just start PCREsearchConfig.exe and remove the .xml filter from the list and restart TC (or reload the plug-in).
TC plugins: PCREsearch and RegXtract
User avatar
silencer
Senior Member
Senior Member
Posts: 208
Joined: 2003-05-13, 13:18 UTC
Location: The Netherlands

Post by *silencer »

Yes, thanks, this is working! I removed it before, but not restarted between.. And because not working placed it back. :roll:
Post Reply