How to use a variable in XML Metadata

Hi Folks,

I am in mid of a Web Automation where I need to extract some table data from the web page. I have used Extract Structured data for getting table and couple of co-relation. When I run it for the second time I can see significant changes in one of the XML node. Can anyone of you please help me use a regular expression to deal with the metadata XML. Below are the screenshots of the XML nodes and highlighted text values are dynamic and are changing.

image

<extract>
<row exact='1'>
	<webctrl tag='table' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='1' class='  x-grid-row' />
</row>
<column exact='1' attr='text' name='Column1'>
	<webctrl tag='table' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='1' class='  x-grid-row' />
	<webctrl tag='td' idx='1' class='x-grid-cell x-grid-td x-grid-cell-gridcolumn-2257 x-grid-cell-first' />
	<webctrl tag='div' idx='1' class='x-grid-cell-inner ' />
	<webctrl tag='table' idx='1' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='2' />
	<webctrl tag='td' idx='2' />
	<webctrl tag='div' idx='1' class='x-form-item-cell ' />
</column>
<column exact='1' attr='text' name='Column2'>
	<webctrl tag='table' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='1' class='  x-grid-row' />
	<webctrl tag='td' idx='1' class='x-grid-cell x-grid-td x-grid-cell-gridcolumn-2258 x-grid-cell-last' />
	<webctrl tag='div' idx='1' class='x-grid-cell-inner ' />
	<webctrl tag='table' idx='1' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='1' />
	<webctrl tag='td' idx='1' />
	<webctrl tag='label' idx='1' class='x-form-item-label' />
</column>
<column exact='1' attr='text' name='Column3'>
	<webctrl tag='table' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='1' class='  x-grid-row' />
	<webctrl tag='td' idx='1' class='x-grid-cell x-grid-td x-grid-cell-gridcolumn-2258 x-grid-cell-last' />
	<webctrl tag='div' idx='1' class='x-grid-cell-inner ' />
	<webctrl tag='table' idx='1' />
	<webctrl tag='tbody' idx='1' />
	<webctrl tag='tr' idx='2' />
	<webctrl tag='td' idx='1' />
	<webctrl tag='div' idx='1' class='x-form-item-cell ' />
</column>
2 Likes

I even tried giving ‘*’ for skipping those digits in the XML string but no luck.

Hi Chinmay, do you have a solution yet? I am also stuck in a similar issue

Hello, I have similar issue , when I use Data Scrapping I get this metadata:

    <extract>
	<column attr='text' name='Column1' exact='1'>
                              <webctrl class='results-list__wrapper results-list__wrapper--narrow' tag='div' idx='1' />
		<webctrl tag='quote-row' />
		<webctrl class='result-minimalist ThirdParty' tag='div' idx='1' />
		<webctrl class='result-minimalist__body' tag='div' idx='1' />
		<webctrl class='result__cta result__cta--minimalist' tag='div' idx='1' />
		<webctrl class='result__omni-cta' tag='div' idx='1' />
		<webctrl class='btn-wrapper' tag='div' idx='1' />
		<webctrl tag='mer-subscription' idx='1' />
		<webctrl class='btn btn--primary' tag='button' idx='1' />
		<webctrl class='price' tag='div' idx='1' />
	</column>
</extract>

but after running for the second time my bot the web page changed , this is the second MetaData

 <extract>
    	<column exact='1' name='Column1' attr='text'>
    		<webctrl class='results-list__wrapper' idx='1' tag='div' />
    		<webctrl class='is-enabled' tag='quote-row' />
    		<webctrl class='result coverageType--ThirdParty' idx='1' tag='div' />
    		<webctrl class='result__body' idx='1' tag='div' />
    		<webctrl class='result__price price price--global is-visible' idx='1' tag='div' />
    		<webctrl class='price__amount price__amount--primary' idx='1' tag='div' />
    	</column>
    </extract>

so any idea how to make my own MetaData dynamique to get working in all cases??

I found solution here

https://forum.uipath.com/t/pass-variable-in-extractmetadata/8417/8