Unable to parse input file (xml)

https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

I created a document type based on this xml, made a simple flow service and assigned one MAP step into it. I set the document type as input in the Input/Output tab, but when the service is run and selecting the xml (the original xml, not the document type), it gives “Unable to parse input file”. Should there be some steps to make the xml file proper format before putting into MAP?

Hi Jesper,

can you provide a screen shot of your service please?

After reading in the file as string you should convert it to document by using the pub.xml:* built-in-services.
After conversion you can map the data.

Regards,
Holger

Loading xml here fails. Current values are manually inserted.

Hi,

Might be an issue with xml namespacing.

Please provide a screen shot of the service where convert service is invoked.
Additionally provide a ScreenShot of the DocType definition in your implementation.

Hopefully there is an XSD available for this DocType so you can get the DocType generated in Designer based on the XSD.

pub.file:getFile (asString)
pub.xml:xmlStringToNode
pub.xml:xmlNodeToDocument

Remember to set conformsTo parameter to point to doctype node or schema node (when generated from XSD).
When the xml file is embedded in a WS call, take care to extract at the right level.

The Output of the last step should be the document to be handed over to convert service.

Is there any reason in the logs why it considers the XML unparseable?
This might help to understand what is going wrong.

Regards,
Holger

I found the issue. When creating document type from xml, either from url or local file, it added “prefix0:” into the name of 3 xml elements. Is this namespacing? If so is there anyway to prevent it when creating document types? Fixing large files by hand would be tiresome :).

Yes that is the namespace (contains in the WS doc type you got) and you can handle that in the step of pub.xmlmlNodeToDocument setting the nsDecls param and try to parse it… See if that resolves the issue.

HTH,
RMG