|
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).
|
|
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.
|
|
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.
|
|
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).
|
|
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.
|
|
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?
|
|
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.
|
|
guest |