Analysing/editing of Wordpress xml files (online shop)

Hi to all you experts,

I'm desperately looking for a Studio 2019 filetype that allows me to analyze and work on XML files generated from a Wordpress site (online shop).

The standard XML filetype is working quite properly for the static web pages, but the shop data aren't read/analyzed/recognized at all.

I tried to define a custom XML filetype (e.g. according to the - very valuable - instruction on https://multifarious.filkin.com/), but failed - probably because I don't know too much about the XML file format - and I need to submit a quotation for both parts of the website (and naturally also have to work on those), not only for the pages.

Can someone help?

Thanks a lot for your assistance! 

Corinna

  • Can you share a sample file so we can give you a hint?

  • Hello Paul,

    Thanks for your reply and willingness to help - please find a sample file attached (hope this will do ...)

    sample-file.xml
    					<item>
    		<title>Wildflowers</title>
    		<link>https://xxx.nl/nl/?post_type=product&#038;p=75169</link>
    		<pubDate></pubDate>
    		<dc:creator><![CDATA[admin_xxx]]></dc:creator>
    		<guid isPermaLink="false">https://xxx.nl/?post_type=product&#038;p=75169</guid>
    		<description></description>
    		<content:encoded><![CDATA[Keramische tegels worden al sinds de 16e eeuw gemaakt in Delft en omstreken. xxx eert deze traditie en creëert miniatuurverhalen op tegels. Alle tegels worden in Nederland ambachtelijk gebakken op hoge temperatuur. De kunstwerkjes zijn dus hitte- en waterbestendig waardoor het bijzondere design levenslang mee gaat. Elk ontwerp is met de hand gebakken en daarmee uniek.
    
    De tegels worden geleverd met een ophangsysteem en zijn beschikbaar in volgende maten: Small: 10×10 cm Medium: 13×13 cm* Large 20x20cm
    
    *De medium tegel is gelijk aan het formaat van het beroemde Oud Hollandse Witje]]></content:encoded>
    		<excerpt:encoded><![CDATA[<p><br data-mce-bogus="1"></p>]]></excerpt:encoded>
    		<wp:post_id>75169</wp:post_id>
    		<wp:post_date><![CDATA[2019-11-27 10:20:21]]></wp:post_date>
    		<wp:post_date_gmt><![CDATA[0000-00-00 00:00:00]]></wp:post_date_gmt>
    		<wp:comment_status><![CDATA[closed]]></wp:comment_status>
    		<wp:ping_status><![CDATA[closed]]></wp:ping_status>
    		<wp:post_name><![CDATA[]]></wp:post_name>
    		<wp:status><![CDATA[draft]]></wp:status>
    		<wp:post_parent>0</wp:post_parent>
    		<wp:menu_order>0</wp:menu_order>
    		<wp:post_type><![CDATA[product]]></wp:post_type>
    		<wp:post_password><![CDATA[]]></wp:post_password>
    		<wp:is_sticky>0</wp:is_sticky>
    										<category domain="pa_grootte" nicename="10x10cm-2"><![CDATA[10x10cm]]></category>
    		<category domain="pa_grootte" nicename="13x13cm-2"><![CDATA[13x13cm]]></category>
    		<category domain="pa_dikte" nicename="1cm"><![CDATA[1cm]]></category>
    		<category domain="pa_tile-quantity" nicename="6-tegels"><![CDATA[6 tegels]]></category>
    		<category domain="product_shipping_class" nicename="zelfde-dag"><![CDATA[Dezelfde werkdag verstuurd]]></category>
    		<category domain="pa_materiaal" nicename="keramiek"><![CDATA[Keramiek]]></category>
    		<category domain="pa_overig" nicename="met-ophangsysteem"><![CDATA[Met ophangsysteem]]></category>
    		<category domain="pa_designer" nicename="nathalie-lete"><![CDATA[Nathalie Lété]]></category>
    		<category domain="pa_label" nicename="nieuw"><![CDATA[Nieuw]]></category>
    		<category domain="translation_priority" nicename="optioneel"><![CDATA[Optioneel]]></category>
    		<category domain="product_visibility" nicename="outofstock"><![CDATA[outofstock]]></category>
    		<category domain="product_cat" nicename="xxx-tableau"><![CDATA[Tile Tableau]]></category>
    		<category domain="product_type" nicename="variable"><![CDATA[variable]]></category>
    						<wp:postmeta>
    		<wp:meta_key><![CDATA[_wpml_word_count]]></wp:meta_key>
    		<wp:meta_value><![CDATA[{"total":92,"to_translate":{"en":92}}]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_yst_prominent_words_version]]></wp:meta_key>
    		<wp:meta_value><![CDATA[1]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_edit_last]]></wp:meta_key>
    		<wp:meta_value><![CDATA[1372]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_wpml_media_featured]]></wp:meta_key>
    		<wp:meta_value><![CDATA[1]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_wpml_media_duplicate]]></wp:meta_key>
    		<wp:meta_value><![CDATA[1]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_wpml_location_migration_done]]></wp:meta_key>
    		<wp:meta_value><![CDATA[1]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[total_sales]]></wp:meta_key>
    		<wp:meta_value><![CDATA[0]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_tax_status]]></wp:meta_key>
    		<wp:meta_value><![CDATA[taxable]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_tax_class]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_manage_stock]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_backorders]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_sold_individually]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_virtual]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_downloadable]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_download_limit]]></wp:meta_key>
    		<wp:meta_value><![CDATA[-1]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_download_expiry]]></wp:meta_key>
    		<wp:meta_value><![CDATA[-1]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_stock]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_stock_status]]></wp:meta_key>
    		<wp:meta_value><![CDATA[outofstock]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_wc_average_rating]]></wp:meta_key>
    		<wp:meta_value><![CDATA[0]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_wc_review_count]]></wp:meta_key>
    		<wp:meta_value><![CDATA[0]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_product_attributes]]></wp:meta_key>
    		<wp:meta_value><![CDATA[a:7:{s:11:"pa_designer";a:6:{s:4:"name";s:11:"pa_designer";s:5:"value";s:0:"";s:8:"position";s:1:"0";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"0";s:11:"is_taxonomy";s:1:"1";}s:8:"pa_dikte";a:6:{s:4:"name";s:8:"pa_dikte";s:5:"value";s:0:"";s:8:"position";s:1:"1";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"0";s:11:"is_taxonomy";s:1:"1";}s:10:"pa_grootte";a:6:{s:4:"name";s:10:"pa_grootte";s:5:"value";s:0:"";s:8:"position";s:1:"2";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"1";s:11:"is_taxonomy";s:1:"1";}s:8:"pa_label";a:6:{s:4:"name";s:8:"pa_label";s:5:"value";s:0:"";s:8:"position";s:1:"3";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"0";s:11:"is_taxonomy";s:1:"1";}s:12:"pa_materiaal";a:6:{s:4:"name";s:12:"pa_materiaal";s:5:"value";s:0:"";s:8:"position";s:1:"4";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"0";s:11:"is_taxonomy";s:1:"1";}s:9:"pa_overig";a:6:{s:4:"name";s:9:"pa_overig";s:5:"value";s:0:"";s:8:"position";s:1:"5";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"0";s:11:"is_taxonomy";s:1:"1";}s:16:"pa_tile-quantity";a:6:{s:4:"name";s:16:"pa_tile-quantity";s:5:"value";s:0:"";s:8:"position";s:1:"6";s:10:"is_visible";s:1:"1";s:12:"is_variation";s:1:"0";s:11:"is_taxonomy";s:1:"1";}}]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_product_version]]></wp:meta_key>
    		<wp:meta_value><![CDATA[3.8.0]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_default_attributes]]></wp:meta_key>
    		<wp:meta_value><![CDATA[a:1:{s:10:"pa_grootte";s:9:"10x10cm-2";}]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[reseller_have_wholesale_price]]></wp:meta_key>
    		<wp:meta_value><![CDATA[yes]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wholesale_customer_have_wholesale_price]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_thumbnail_id]]></wp:meta_key>
    		<wp:meta_value><![CDATA[74938]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wwpp_ignore_cat_level_wholesale_discount]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wwpp_ignore_role_level_wholesale_discount]]></wp:meta_key>
    		<wp:meta_value><![CDATA[no]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wwpp_product_hash]]></wp:meta_key>
    		<wp:meta_value><![CDATA[5dde3f66e33260.97558481]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_coupon_title]]></wp:meta_key>
    		<wp:meta_value><![CDATA[a:0:{}]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_yoast_wpseo_primary_product_cat]]></wp:meta_key>
    		<wp:meta_value><![CDATA[30]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_post_hide_nav]]></wp:meta_key>
    		<wp:meta_value><![CDATA[default]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_page_layout]]></wp:meta_key>
    		<wp:meta_value><![CDATA[et_right_sidebar]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_side_nav]]></wp:meta_key>
    		<wp:meta_value><![CDATA[off]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_use_builder]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_first_image]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_truncate_post]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_et_pb_old_content]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_yoast_wpseo_content_score]]></wp:meta_key>
    		<wp:meta_value><![CDATA[60]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_yoast_wpseo_focuskeywords]]></wp:meta_key>
    		<wp:meta_value><![CDATA[[]]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_yoast_wpseo_keywordsynonyms]]></wp:meta_key>
    		<wp:meta_value><![CDATA[[""]]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[reseller_variations_with_wholesale_price]]></wp:meta_key>
    		<wp:meta_value><![CDATA[75170]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[reseller_variations_with_wholesale_price]]></wp:meta_key>
    		<wp:meta_value><![CDATA[75171]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[reseller_variable_level_wholesale_minimum_order_quantity]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wholesale_customer_variable_level_wholesale_minimum_order_quantity]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[reseller_variable_level_wholesale_order_quantity_step]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wholesale_customer_variable_level_wholesale_order_quantity_step]]></wp:meta_key>
    		<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[wwpp_product_wholesale_visibility_filter]]></wp:meta_key>
    		<wp:meta_value><![CDATA[all]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_price]]></wp:meta_key>
    		<wp:meta_value><![CDATA[150]]></wp:meta_value>
    		</wp:postmeta>
    							<wp:postmeta>
    		<wp:meta_key><![CDATA[_price]]></wp:meta_key>
    		<wp:meta_value><![CDATA[245]]></wp:meta_value>
    		</wp:postmeta>
    							</item>

    Thank you and kind regards, Corinna

  • Thanks for the sample file.  The first thing you need to do is identify what should actually be translated in this file.  Quickly reviewing this there is actually very little that looks as though it would be translatable... maybe just this part:

    <content:encoded><![CDATA[Keramische tegels worden al sinds de 16e eeuw gemaakt in Delft en omstreken. xxx eert deze traditie en creëert miniatuurverhalen op tegels. Alle tegels worden in Nederland ambachtelijk gebakken op hoge temperatuur. De kunstwerkjes zijn dus hitte- en waterbestendig waardoor het bijzondere design levenslang mee gaat. Elk ontwerp is met de hand gebakken en daarmee uniek.

    De tegels worden geleverd met een ophangsysteem en zijn beschikbaar in volgende maten: Small: 10×10 cm Medium: 13×13 cm* Large 20x20cm

    *De medium tegel is gelijk aan het formaat van het beroemde Oud Hollandse Witje
    ]]></content:encoded>

    There are also some statuses and post types that may or may not be required for translation... I think you'd need to check with your client, so things like these:

    <wp:comment_status><![CDATA[closed]]></wp:comment_status>

    <wp:status><![CDATA[draft]]></wp:status>

    <wp:post_type><![CDATA[product]]></wp:post_type>

    The out of the box XML filetype will open this file and it extracts all of this along with a lot of other stuff I'm pretty sure you don't want.  So the first step is to determine what needs to be translated.

    Once you have this information it should be fairly sraightforward.  For example, I created a filetype using just two rules like this.  One to prevent anything from being extracted and then anoter to extract only the content of the content:encoded element above:

    See if any of this helps you.

    Also, you mentioned that this file is not being handled at all and it should be.  Can you tell us more about what happens when you try to open it?

  • Hello Paul,

    Thanks for your reply. I just tried your a.m. solution, but I'm ending up with the same result.

    If I create a new project with one of the xml files in question, I receive an error message "The process can't access this xml file as it's used by another process". I confirm the error message and can then see the file in the project's initial screen with the created xml filetype assigned to it, but there's no way to continue creating the project:

    If I press "Next", I receive the next error message: "The project must contain at least one file to be translated", and I have no option but to abort creating the project.

    When I first received all xml files from the customer, I tried to analyse all 5 files in one project. Three files were analysed (static web pages), but these two xml files weren't analysed at all. I was able to see them in the project's file list, but without any content (both no word count and no content upon opening them in the Studio editor). 

    That's why I tried to create a custom xml file type for these two files. 

    Thanks & kind regards,

    Corinna

  • "The process can't access this xml file as it's used by another process"

    This has nothing to do with the filetype settings.  I reckon if you open this as a single file for translation and not as part of your project it will probaby work.  If it doesn't then maybe you have this file open in another application somewhere?  Worth checking your processes to see what may be hanging onto it.

    If this is not the problem then it "might" be due to a known bug in Studo related to validation.  Try turning off all of these checks in your filetype validation before creating your project:

  • Hello Paul,

    the validation settings don't seem to be the root cause for this problem; they are identical to those shown in your screenshot.

    I had already tried to open the file as single file for translation - it actually does open, but there's no content:

    To overcome the error message, I have also tried to copy this "problem file" (supposed to be open in another aplication) to another location and use that copied file instead, but still the message is the same. I have also rebooted my PC several times to make sure there's no process/application left using this file (I had indeed opened it in the text editor to check for the translateable lines, but also had closed the text editor before trying to create the project).

    Regards,

    Corinna

  • the validation settings don't seem to be the root cause for this problem; they are identical to those shown in your screenshot.

    I didn't say copy my settings... I just showed you where they are.  Try turning them all off.

    I had already tried to open the file as single file for translation - it actually does open, but there's no content:

    In this case you are either opening a file that has no content for translation, or you are not using the correct filetype.  If you switch to TagID mode then orange tab at the top of the file in the editor will display the name of the filetype being used and you can verify it.

    For me, because I created a custom xml filetype it says this:

    This is because I set it here:

    So whatever it says you should be able to make sure you are using the filtype you think you are.

  • I didn't say copy my settings... I just showed you where they are.  Try turning them all off.

    Sorry for expressing this unclearly - they are all turned off, that's what I meant.

    So whatever it says you should be able to make sure you are using the filtype you think you are.

    Actually, the filetype created before (I named it "wordpress-test") has been used. 

    BUT ... I just tried the same not using the "real" xml file, but using the sample file instead I created to provide it here. And unbelievably, this file works perfectly fine and delivers the same result as on your side. So, I assume that the problem is not the custom filetype creation, but maybe an error in the source files.

    I'll get in touch with the customer to double-check - maybe I'm not that stupid after all. 

    Thank you very much, Paul, for your great support on this! I'll update this post as soon as they'll provide me with new source files to let you know whether it's solved.

    Best wishes,

    Corinna