XML pickup tool

Post Reply
sherczog
Newbie
Posts: 6
Joined: Wed Mar 23, 2011 3:43 pm

XML pickup tool

Post by sherczog »

Can someone help me with the tool xml-pickup?

I want to catch a file as defined in an xml.



The flow gives an error: Failed to find asset ''
An xml file (called: testXml.xml) containing:







pad

E:test.txt






And in Powerswtich an Single-line text with variables defined: [Metadata.Text:Path="//field[tag=pad]/value",Dataset="Xml",Model="XML"].


Where do I go wrong?


mattbeals
Member
Posts: 59
Joined: Fri Oct 29, 2010 2:49 am
Location: Edmonds, WA
Contact:

XML pickup tool

Post by mattbeals »

As far as I know this requires a script expression rather than a condition with variable. But I do not have a script that would do this.
I'm just a dude. Anything I say has nothing to do with any other person or company.
mattbeals
Member
Posts: 59
Joined: Fri Oct 29, 2010 2:49 am
Location: Edmonds, WA
Contact:

XML pickup tool

Post by mattbeals »

Here, try this:

http://www.mattbeals.com/misc/inject_job.zip

http://www.mattbeals.com/misc/inject_job2.zip



What I did was use the XML as the asset itself. Then I use the inject job to point to a fixed location where the job resides. All the metadata that comes inside the XML is preserved and can be used for routing/processing.



The second sample has a UNC path to the asset itself.
I'm just a dude. Anything I say has nothing to do with any other person or company.
sherczog
Newbie
Posts: 6
Joined: Wed Mar 23, 2011 3:43 pm

XML pickup tool

Post by sherczog »

It works!

Although I do not understand how. How does PowerSwitch know where the tag is for the path? In the manual it says : “the asset (the xml file) must contain data of the appropriate type..” What is the appropriate type?



The method in my original question (XMLpickup – Metadata refers to asset) suggests that the structure of the xml is flexible as long as your Xpath statement is correct... but that didn’t work, so I guess my logic is not sound.



Maybe Enfocus can provide with some more information...but for now I can use your solution.



thanx


bens
Member
Posts: 130
Joined: Thu Mar 03, 2011 10:13 am

XML pickup tool

Post by bens »

sherczog wrote: And in Powerswtich an Single-line text with variables defined: [Metadata.Text:Path="//field[tag=pad]/value",Dataset="Xml",Model="XML"].
The xpath expression is not completely correct. Try this one:



[Metadata.Text:Path="//field[tag='pad']/value",Dataset="Xml",Model="XML"]
Post Reply