Search found 99 matches
- Fri Sep 11, 2020 4:44 pm
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
Well in the for..loop it seems to work now. But I have a similar issue now with an object. I have this object: { prokom_id: '', liefergrund: '', eintragsversion: { bundesweit: '', stichwort: '', tb: '', vab: '', lieferanten_id: '', gueltig_von: '', gueltig_bis: '', widerspruch: '', nutzung: { auskun...
- Wed Sep 09, 2020 8:46 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
I am nearly finished with my script. There is only one last issue I am facing. When I eval a node like var eintrag_anlegen = xml.evalToNodes("//lieferung/eintragsaenderungen/eintrag_anlegen"); And there is no "eintrag_anlegen" in this particular xml-file, I made a check like if (...
- Fri Aug 28, 2020 10:17 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
function jobArrived( s : Switch, job : Job ) { var xml = new Document( job.getPath() ); var eintragPflegenNodes = xml.evalToNodes("//eintragsaenderungen/eintrag_pflegen"); for (var j=0; j<eintragPflegenNodes.length; j++) { job.log( 1,eintragPflegenNodes.at( j ).getBaseName() ); var attrLi...
- Fri Aug 28, 2020 8:19 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
If you have to iterate over the nodes because you have to use if then to select the correct one, then you have to use the Document class. var xml = new Document(pathToXMLFile); var eintragNodes = xml.evalToNodes("//eintragsaenderungen/eintrag_anlegen"); for (var i=0; i<eintragNodes.length...
- Fri Aug 21, 2020 11:44 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
Bildschirmfoto 2020-08-21 um 10.24.45.png Your screenshot shows that \Lieverung\ has an attribute and a subnode, but no simple string content. I guess that is why the variable doesn't return anything. Which return do you want to get? You are right. When I go down to some sub-nodes and select a valu...
- Fri Aug 21, 2020 10:46 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
Escape your " with \ like this var xml = job.getVariableAsString("[Metadata.Text:Path=\"/lieferung/\",Dataset=\"Xml\",Model=\"XML\"]"); Flow is not starting then. Also I think I dont need to escape the double quotes because I wrapped them into single quo...
- Fri Aug 21, 2020 10:30 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
Re: XML-path to string
gosh something is weird with the pics in this forum... :-/
- Fri Aug 21, 2020 10:30 am
- Forum: LEGACY scripting
- Topic: XML-path to string
- Replies: 14
- Views: 25140
XML-path to string
Hey there, I use "job.getVariableAsString(' ')" to get a XML-Path as string in my script. But i only get undefined. Also when I try to select that node directly it says that this node is not available altough I can select it. See the pics Bildschirmfoto 2020-08-21 um 10.24.45.png Bildschir...
- Mon Aug 03, 2020 10:11 pm
- Forum: LEGACY scripting
- Topic: DPD SOAP API
- Replies: 10
- Views: 14343
Re: DPD SOAP API
Wow the node.js package is something I will give it a try but atm we have not updated our server. But we will in the near future. I would love to use http instead but I have no clue on how to get started. Lets say I create a http object and as URL i specifie the wsdl link. How should i send the XML ...
- Sun Aug 02, 2020 2:46 pm
- Forum: LEGACY scripting
- Topic: DPD SOAP API
- Replies: 10
- Views: 14343
Re: DPD SOAP API
Using SOAP is not that different. Instead of building a JSON you have to build an XML and post that and the result will of course also be XML and not JSON. That makes it sound easy, but unfortunately that is not always the case. There is usually a WSDL file (this is in XML) that describes everythin...
- Wed Jul 22, 2020 10:29 am
- Forum: Switch
- Topic: Sending Printjobs to network printers
- Replies: 9
- Views: 10474
Re: Sending Printjobs to network printers
Great thx. I also found a similar tool to ghostgum its called pdftoprinter http://www.columbia.edu/~em36/pdftoprinter.html. Sending print jobs to a printer via cmd is easy, there is no pdfreader poping up now its completely silent. But its also possible to define the amount of copies to print, the p...
- Wed Jul 22, 2020 8:59 am
- Forum: Switch
- Topic: Sending Printjobs to network printers
- Replies: 9
- Views: 10474
Re: Sending Printjobs to network printers
... Switch Setup: Application: C:/Program Files/Ghostgum/gsview/gsprint.exe Parameters: -noquery -color -all -printer "MyWindowsPrinter" "%1" ... Hey Ralf, can you describe that a little further. Are you starting the gsprint.exe from within Switch? An easy alternative if you are...
- Fri Jul 17, 2020 2:47 pm
- Forum: LEGACY scripting
- Topic: Select a file from the beginning of a flow
- Replies: 20
- Views: 20763
Re: Select a file from the beginning of a flow
Hmmm... :| But I run my script for every file which means It would handle the PDF and TXT file separately. So I will end up with 2 new entries in my database. function jobArrived( s : Switch, job : Job ) { var pdf = File.read( job.getPath(), "UTF-8" );// PDF Text einlesen function getSuppl...
- Fri Jul 17, 2020 1:36 pm
- Forum: LEGACY scripting
- Topic: Select a file from the beginning of a flow
- Replies: 20
- Views: 20763
Re: Select a file from the beginning of a flow
okay, I have this PDF ARCHIV 48h trashcan in there, where all the incoming PDF are archived for 48 hours.
Is there a way to select the belonging PDF-file in the script, some job.get... function or similar?
Is there a way to select the belonging PDF-file in the script, some job.get... function or similar?
- Fri Jul 17, 2020 1:16 pm
- Forum: LEGACY scripting
- Topic: Select a file from the beginning of a flow
- Replies: 20
- Views: 20763
Select a file from the beginning of a flow
Hello, I have this flow: Bildschirmfoto 2020-07-17 um 13.07.23.png In the Flow I get a PDF-File from Email convert it to text search with regex in the text. When I work with the File i always use File.read(job.getPath(), 'UTF-8'); wich gives me the incoming file wich is the txt-File. Now I also need...