Rank: Newbie
Joined: 3/28/2019 Posts: 1 Location: softgate gmbh, allee am röthelheimpark 43, 91052 e
|
Hello all,
we have a problem to match a pre-defined XML-Input-Structure to an also pre-defined XML-Output-Structure with MapForce.
The input-structure is:
<?xml version="1.0" encoding="ISO-8859-15"?> <process type="ScanDL_JCPosteingang" source="ScanDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/tmp/JHA/XML/Posteingang/_procinfo_Posteingang.xsd"> <metadata> <data name="Scandatum">11.03.2019</data> <data name="Dokumentenklassifizierung">Sonstiger Posteingang</data> <data name="BG-Nummer"/> <data name="Abholort">Haltern am See</data> <data name="Dokumentenid">201903110000001</data> </metadata> <files> <file name="DATEINAME.pdf"> </file> </files> <datafile/> </process>
and the corresponding output-structure is:
<?xml version="1.0" encoding="utf-8"?> <Batch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/tmp/JHA/XML/Posteingang/output.xsd"> <BatchFields/> <DocumentFields> <Scandatum/> <Dokumentenklassifizierung/> <BG-Nummer/> <Abholort/> <Dokumentenid/> <Dateiname/> </DocumentFields> <DocumentTables> </DocumentTables> </Batch>
The problem ist, that we have on the input-side only the possibility, to make an connection from "name" to the corresponding output-side, for example "Scandatum. We cannot make a connect from input "Scandatum" to output ""Scandatum".
Is the input-xml-structure unusable for this?
Greetings
Jürgen HäffnerFile Attachment(s): _procinfo_Posteingang.xsd (3kb) downloaded 129 time(s). _procinfo_Posteingang.XML (1kb) downloaded 94 time(s). Output.xml (1kb) downloaded 108 time(s). output.xsd (2kb) downloaded 105 time(s).
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
First of all, your output schema is wrong. It doesn't allow textual values - this is because you've generated it from a sample XML instance which had no values. I've modified it to contains strings - see attachment
Second, you can use "Show Child Elements with Dynamic Names" feature to generate elements with names from the attribute valuesFile Attachment(s): output.xsd (1kb) downloaded 104 time(s).
vlad attached the following image(s):
|