-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transform function return undefined (5318992) #80
Comments
can you provide the xml input that cause the error? |
Ok, so the issue was this: |
@AviramCloudbeat if you could send the xml and template, maybe i can debug it and have better error handling implemented |
Here is an example file (notice the suffix is txt since github doesn't allow xml files here, so just change the suffix). |
@AviramCloudbeat second is not a valid xpath expression. if you want to concat, you can do this const { transform } = require('camaro')
const xml = require('fs').readFileSync('input.xml', 'utf-8')
;(async function() {
var example =
"string(//HTTPSamplerProxy[@testname='test1']/stringProp[@name='HTTPSampler.protocol'])"
const sampleTemplate = { first: example, second: `concat(${example}, ${example})` }
const result = await transform(xml, sampleTemplate)
console.log(JSON.stringify(result, null, 2))
})() |
Yes, I understand it now :( |
true. i can def. do a better error reporting here. |
Hello,
I'm trying to use camaro in my project and I encounter a problem that I'm not sure where it is coming from.
this is my code:
the result is that transform return undefined error (with number 5318992)
and I can't figure out why because there is no err.message or err.stack - both return undefined as well.
The text was updated successfully, but these errors were encountered: