XML PICK UP RESULTING FLOW
XML PICK UP RESULTING FLOW
I have an input folder which receives folders (XX-AA_BB)
Inside each folder is an xml file (XX_AA_BB.xml) and a PDF (XX_AA_BB.pdf)
When this new folder arrives I want to pick up the xml, read it and only look for an item within the xml (BB) for which I can read the data. The reason is that the xml contains multiple items and I'm only interested in a specific item.
1.How do I read the xml? Do I need some XSLT to make it work?
2.How do I identify just the one item (BB) from all the other items?
An example of this would be that (BB) is A4 and 200 copies. I want to then flow the PDF of the same name to the correct folder.
Inside each folder is an xml file (XX_AA_BB.xml) and a PDF (XX_AA_BB.pdf)
When this new folder arrives I want to pick up the xml, read it and only look for an item within the xml (BB) for which I can read the data. The reason is that the xml contains multiple items and I'm only interested in a specific item.
1.How do I read the xml? Do I need some XSLT to make it work?
2.How do I identify just the one item (BB) from all the other items?
An example of this would be that (BB) is A4 and 200 copies. I want to then flow the PDF of the same name to the correct folder.
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
XML PICK UP RESULTING FLOW
I am not sure that I totally understood your final goal but:
1. to read the xml data you can use the XML pickup tool - it makes the data in the xml file "accessible". No, I do not think that you need xslt.
2. Either Xpath or if the structure of all XML files is the same you might access the specific tag directly.
Please elaborate a bit more about your goal and I might give some more assistance.
Ariel
1. to read the xml data you can use the XML pickup tool - it makes the data in the xml file "accessible". No, I do not think that you need xslt.
2. Either Xpath or if the structure of all XML files is the same you might access the specific tag directly.
Please elaborate a bit more about your goal and I might give some more assistance.
Ariel
XML PICK UP RESULTING FLOW
I cannot get the xml to be read even if I try the xml pickup as metadata is the asset. Without that I cannot progress further with the flow, that why I wanted Question 1 clarifying
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
XML PICK UP RESULTING FLOW
Is the XML valid - have you tried to read it with a browser?
XML PICK UP RESULTING FLOW
Hi,
The xml is valid, and I've now got it to work and can see the items
That leads me onto question 2. How can I identify the correct item within the xml based on the xml filename containing (BB)? I need to be able to read just that part of the filename and select the correct item data based on the name
Thanks for your help
The xml is valid, and I've now got it to work and can see the items

That leads me onto question 2. How can I identify the correct item within the xml based on the xml filename containing (BB)? I need to be able to read just that part of the filename and select the correct item data based on the name
Thanks for your help
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
XML PICK UP RESULTING FLOW
reading only the BB part of the filename is easy - either script or "Define Text with variables" Job.NameProper and applying twice the "After" function.
Searching in XML depends on whether you know the tag to look at. Do you know where to look for it?
Searching in XML depends on whether you know the tag to look at. Do you know where to look for it?
XML PICK UP RESULTING FLOW
Hi,
Thanks again. That works.
Does the flow have to be a 2 stage process because there is the need to identify the item, THEN read the variables for that item only?
Thanks again. That works.
Does the flow have to be a 2 stage process because there is the need to identify the item, THEN read the variables for that item only?
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
XML PICK UP RESULTING FLOW
how did you read the variables in the end?
XML PICK UP RESULTING FLOW
Hi I read the item variable (BB) using using define text with variables. I'm just trying to understand how to ensure we only read the variable of BB only.
An example would be multiple items, each with stock size and quantity. I only want to read the stock size and quantity of BB and THEN flow the pdf accordingly.
An example would be multiple items, each with stock size and quantity. I only want to read the stock size and quantity of BB and THEN flow the pdf accordingly.
XML PICK UP RESULTING FLOW
BB" Rush="No" type="New" approved="Yes" WaitingScheduler="No">
Business Card
250
I want to ensure I only use the item with line number BB and read the correct quantity
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
XML PICK UP RESULTING FLOW
/Items/Item[@LineNumber='BB']/Quantity
XML PICK UP RESULTING FLOW
How would you use a variable for "BB" ie JobName?
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
XML PICK UP RESULTING FLOW
Using multi-line text with variables: /Items/Item[@LineNumber='[Job.Name]']/Quantity
XML PICK UP RESULTING FLOW
thanks for all the help.
I got the static version to work: [Metadata.Text:Path="/Request/Items/Item[@LineNumber='PM2628']/Quantity",Dataset="Xml",Model="XML"]
But failed with the variable version: [Metadata.Text:Path="/Request/Items/Item[@LineNumber='[Job.NameProper:After_]']/Quantity",Dataset="Xml",Model="XML"]
I get an error about the unexpected _ appearing
Any ideas??
I got the static version to work: [Metadata.Text:Path="/Request/Items/Item[@LineNumber='PM2628']/Quantity",Dataset="Xml",Model="XML"]
But failed with the variable version: [Metadata.Text:Path="/Request/Items/Item[@LineNumber='[Job.NameProper:After_]']/Quantity",Dataset="Xml",Model="XML"]
I get an error about the unexpected _ appearing
Any ideas??
XML PICK UP RESULTING FLOW
You cannot use variables inside XPath expressions. First, there is the clash of quotation marks within quotation marks (that explains the error message you see), but second, even when you use some variable that does not use quotation marks, you will see the variable does not get resolved.
With a script expression you can build the XPath you need.
Freddy
With a script expression you can build the XPath you need.
Freddy