IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Handle HTML tags from XML in mapforce Options · View
Soedersen
Posted: Thursday, April 19, 2018 9:17:29 AM
Rank: Newbie

Joined: 4/19/2018
Posts: 4
Hello,

I'm having troubble with html-table in xml with mapforce.
It looks like mapforce removes HTML tags and that makes the output unstructured.

It looks "ok" in input xml, but in output html tags are removed and the structure is lost (lines/spaces etc.)
We tried to identify the tags (ie <td></td) and structure from them in mapping but it seems like tags are allready gone.
Anybody knows how to handle HTMLcode from XML with mapforce correctly?

File Attachment(s):
TEST_htm_in.xml (4kb) downloaded 187 time(s).
TEST_html.xsd (1kb) downloaded 190 time(s).
TEST_html_out.xml (2kb) downloaded 202 time(s).
TEST_html_out.xsd (1kb) downloaded 203 time(s).
TEST_html_map.mfd (6kb) downloaded 212 time(s).


island
Posted: Thursday, April 19, 2018 4:24:03 PM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
Hi,

attach the actual input xml file, the actual input xsd file, the output xsd file and the mapping file .mfd so that it is clear what the situation is.
Soedersen
Posted: Friday, April 20, 2018 7:15:03 AM
Rank: Newbie

Joined: 4/19/2018
Posts: 4
Attatched files

Edit: there are som tokenize i the mapping now that i applied to test, but they're not relevant. Direct connection gives the same result.
K101
Posted: Friday, April 20, 2018 10:07:10 AM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 588
Remove the simple type definition for your MakroMikroBeskrivelse element, then use the dynamic node name functionality to map all children of those elements as demonstrated by the attached, revised example.

File Attachment(s):
Handle HTML tags from XML in mapforce.zip (6kb) downloaded 231 time(s).


Soedersen
Posted: Friday, April 20, 2018 11:03:37 AM
Rank: Newbie

Joined: 4/19/2018
Posts: 4
Thanks alot for your help! This looks promissing, but unfortunately i can't open your mapping in my versjon of mapforce (PE 2016 Rel 2).
Probably best way to solve this is to upgrade to newer version. Looks like we don't have dynamic node name functionality in our version.

Thanks again.
that
Posted: Friday, April 20, 2018 12:23:04 PM
Rank: Advanced Member

Joined: 6/16/2006
Posts: 500
Location: AT
If you just want to copy all content of the element to the target, maybe all you need is a copy-all connection?
Soedersen
Posted: Monday, April 23, 2018 2:33:44 PM
Rank: Newbie

Joined: 4/19/2018
Posts: 4
Both of your solutions works in this example.

Unfortunately our original mapping required conditions which cannot be applied to connections with child elements.
Also, i did a test with the HTML table in our endproduct (infopath) which also ignores table structure.

So i'm making a concat with substring before/after to macth each node name and add value and then newline between.

Thanks again for your help. Even if we can't use it, i've learned something new which probably will be usefull.

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.