You are viewing limited content. For full access, please sign in.

Question

Question

Read XML

asked on May 30, 2017

Hi,

I know this has been asked many times, but I'm new to XML parsing. I'm just hoping someone could help point me in the right direction.  I am able to get other field names but having trouble getting the XPath Expression for template.

 

Regards,

XML.JPG
XML.JPG (121.73 KB)
0 0

Replies

replied on May 30, 2017

I am going to start by stating that you may not need to do any of this.  From you other post, I see that you have Import Agent.  I am guessing that you are using Import Agent to bring in the images and then trying to use Workflow to apply the template data from the XML.  It also appears that the XML is formatted for use with the ImportEngine.  Rather than having the image files imported by Import Agent, tell Import Agent to import the XML file.  When Import Agent grabs the XML, it will recognize it as a List Import XML file and will use the LF ImportEngine to then import the files as directed by the file.  As long as the <LF:fileref ref="C:\image1.tif" /> has the correct image path and the ImportEngine has permissions to the file, it should create the LF Document, apply Template and Field values, and import the images.

 

But if you still want to use Workflow to parse the XML, then you need to search the web for XPath tutorials and/or samples to learn the syntax.  Then you need to copy and paste the full content of one of your XML files into the Test Input area of the Read XML activity.  Then you can test using what you have found on other XPath sites.

2 0
replied on May 30, 2017

Try clicking the Advanced button at the top of the properties pane to show the XML namespaces property:

Then try auto-detecting the namespace. It might make it easier to do XPath matching once it recognizes your custom namespace.

1 0
replied on May 30, 2017

Hi Bert, thanks again for the help. Currently our import agent is working as intended, except for some document with invalid or missing entry in some fields, this causes to load the document w/o data.  So I'm trying to load the xml and apply the data for this cases.

 

Thank you very much!

Incomplete.JPG
Incomplete.JPG (109.63 KB)
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.