Skip to content

Instantly share code, notes, and snippets.

@keithlayne
Created February 2, 2023 18:27
Show Gist options
  • Select an option

  • Save keithlayne/0ca332bebe68189e3b7db917890635a9 to your computer and use it in GitHub Desktop.

Select an option

Save keithlayne/0ca332bebe68189e3b7db917890635a9 to your computer and use it in GitHub Desktop.
xml2js output from svg using namespaces
{
"svg": {
"$": {
"xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"xmlns": "http://www.w3.org/2000/svg",
"version": "1.0",
"xmlns:cc": "http://creativecommons.org/ns#",
"xmlns:dc": "http://purl.org/dc/elements/1.1/",
"viewBox": "0 0 266 312"
},
"metadata": [
{
"rdf:RDF": [
{
"cc:Work": [
{
"$": {
"rdf:about": ""
},
"dc:format": [
"image/svg+xml"
],
"dc:type": [
{
"$": {
"rdf:resource": "http://purl.org/dc/dcmitype/StillImage"
}
}
],
"dc:title": [
""
]
}
]
}
]
}
],
"g": [
{
"$": {
"transform": "translate(-3.3359375,285.2793)"
},
"path": [
{
"$": {
"d": "M132-206c0,1-1,1-1,1h-1c-1,0-1-1-2-2,0,0-1-1-1-2s0-1,1-1l2,1c1,1,2,2,2,3m-18-10c0-5-2-8-5-8,0,0,0,1-1,1v2h3c0,2,1,3,1,5h2m35-5c2,0,3,2,4,5h2c-1-1-1-2-1-3s0-2-1-3-2-2-3-2c0,0-1,1-2,1,0,1,1,1,1,2m-30,16c-1,0-1,0-1-1s0-2,1-3c2,0,3-1,3-1,1,0,1,1,1,1,0,1-1,2-3,4h-1m-11-1c-4-2-5-5-5-10,0-3,0-5,2-7,1-2,3-3,5-3s3,1,5,3c1,3,2,6,2,9v1,1h1v-1c1,0,1-2,1-6,0-3,0-6-2-9s-4-5-8-5c-3,0-6,2-7,5-2,4-2.4,7-2.4,12,0,4,1.4,8,5.4,12,1-1,2-1,3-2m125,141c1,0,1-0.4,1-1.3,0-2.2-1-4.8-4-7.7-3-3-8-4.9-14-5.7-1-0.1-2-0.1-2-0.1-1-0.2-1-0.2-2-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7,4,3,7,8,10,13,2,6,4,12,5,20,1,5,1,10,2,17,0,6,1,10,1,13,1,3,1,7,2,12,1,4,2,8,4,11,2,4,4,8,7,12,3,5,7,10,11,16,9,10,16,21,20,32,5,10,8,23,8,36.9,0,6.9-1,13.6-3,20.1,2,0,3,0.8,4,2.2s2,4.4,3,9.1l1,7.4c1,2.2,2,4.3,5,6.1,2,1.8,4,3.3,7,4.5,2,1,5,2.4,7,4.2,2,2,3,4.1,3,6.3,0,3.4-1,5.9-3,7.7-2,2-4,3.4-7,4.3-2,1-6,3-12,5.82-5,2.96-10,6.55-15,10.8l-10,8.51c-4,3.9-8,6.7-11,8.4-3,1.8-7,2.7-11,2.7l-7-0.8c-8-2.1-13-6.1-16-12.2-16-1.94-29-2.9-37-2.9"
}
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment