CommCare Child Cases


When I am submitting child cases to CommCare, the link to the parent case is supposed to look something like this:

     <n0:parent case_type="Household">15fdc4f7-4ccc-488e-98e3-3bebc2909f26</n0:parent>

The closest I have gotten to emulating this using the adaptor is the following syntax:

Inline image 1

This syntax results in the following xml:

     <n0:parent case_type="Household">

I haven’t been able to find a way to get rid of that tag so that the code is just inside the parent tag. Have you run into this before?

Hey Will,

I can’t see your image, but check out lines 44-51 in this job. “@” takes an object and sets the attributes. “#” takes a value and sets the value for that tag.

Under the hood, we’re using a node module called “js2xmlparser” which does exactly what it sounds like! Check out the basic usage examples here:

Please let me know if this solves your problem.


Yup! ‘#’ was what I was looking for. Thanks!