XML/DOM serialization: Difference between revisions
Content added Content deleted
(→{{header|Factor}}: show how to build an xml tree piece by piece) |
(→{{header|Go}}: Bitbucket.org/rj/xmldom-go was deleted but found alternative version of it on https://gitlab.com/stone.code/xmldom-go.git. I tested the code runs fine with updated lib link.) |
||
Line 866: | Line 866: | ||
=={{header|Go}}== |
=={{header|Go}}== |
||
{{libheader| |
{{libheader|gitlab.com/stone.code/xmldom-go.git}} |
||
A very small, subset of the W3C DOM Core in Go. The work builds off the existing XML parser. A fork of the godom project (http://code.google.com/p/godom/), which appears to be unsupported at the moment. |
|||
A partial solution based on an incomplete library. The library is missing functions needed to create a DOM piece by piece like other other solutions here. It can however create a DOM by parsing XML. Also, it lacks a function to access the processing instruction, so not surprisingly this is missing from the serialized output. |
|||
<lang go>package main |
<lang go>package main |
||
import ( |
import ( |
||
"fmt" |
"fmt" |
||
dom " |
dom "gitlab.com/stone.code/xmldom-go.git" |
||
) |
) |
||