in reply to XML gurus unite!!
And using the XSH2 language, I could have modified the tree with a mixture of XPath loops and Perl expressions. It's quite elegant, and even compiles down to Pure Perl code.<?xml version="1.0" encoding="utf-8"?> <AttributeDatabase> <attribclass toolonly="false" hidden="false" dbvault="true"> <editlist name="default"> <entry>*</entry> </editlist> <preferrededitlist>"default"</preferrededitlist> <attribdef name="mtl_param" synthetic="true" array="true"> <desc>IsSynthetic</desc> <type>Attrib.Types.Vector4</type> <bound>True</bound> <properties platform="common"> <mincount>2</mincount> <maxcount>2</maxcount> </properties> </attribdef> <attribdef name="mtl_Kdiff" toolonly="true"> <memberkeyvalue path="" key="push(bits)->::mtl_param:common +:0:w"/> <desc>controls --> mtl_param[0].w </desc> <type>EA.Reflection.Float</type> <bound>False</bound> <increment>0.001</increment> <properties platform="common"> <max>2.0</max> <min>0.0</min> <defaultreflectedobject>1.0</defaultreflectedobject> </properties> </attribdef> </attribclass> </AttributeDatabase>
I have an article on using xsh2 to scrape HTML as well (embargoed at the moment, should go live in a few weeks).
|
|---|