Is it Possible to Parsing a complete CCDA xml file Using Go?

1.3k views Asked by At

I would like to Parse an complete CCDA XML file by using any library available in Go. I tried to parse the CCDA XML file by using the https://godoc.org/github.com/clbanning/mxj library. In this one we need to go to specific path and parse the data but I want to parse the different scetions at a time by using the package or a library. I googled and ended up with no answers. It would be great if you guys help me.

3

There are 3 answers

1
Burak Serdar On

One thing you can try is to use a DOM library to parse the CCDA, and work on the resulting DOM model. There are several of them, one being https://github.com/lestrrat-go/libxml2, which uses the libxml2 library.

3
zhengchun On

xmlquery to parse any XML document and extract any you want to data by XPath.

0
Bryn Lewis On

I don't know Go, but CCDA is XML, so you can transform it using XSLT. I would assume Go has a way of allowing you to do that.

There are many CCDA xsl examples - it depends what you want the result to be.

eg https://github.com/hl7/cda-core-xsl