No description
Find a file
2025-12-09 14:10:03 +09:00
.github/workflows ci: Add tests workflow (#1) 2025-12-08 20:45:16 +09:00
examples Add files 2025-12-08 19:22:27 +09:00
lowlevel Add more APIs (#8) 2025-12-09 14:10:03 +09:00
tests Add more APIs (#8) 2025-12-09 14:10:03 +09:00
.gitignore Initial commit 2025-12-08 19:20:34 +09:00
LICENSE Initial commit 2025-12-08 19:20:34 +09:00
README.md Update README.md (#7) 2025-12-08 21:02:43 +09:00
xerces.nim Add more APIs (#8) 2025-12-09 14:10:03 +09:00
xerces.nimble Add files 2025-12-08 19:22:27 +09:00

nim-xerces

Nim bindings for Apache Xerces-C++.

Requirements

Installtion

nimble install xerces

Usage

import pkg/xerces

const xmlData = """<?xml version="1.0"?>
<root>
  <item id="1">Hello</item>
</root>"""

proc main() =
  XMLPlatformUtils.initialize()
  defer: XMLPlatformUtils.terminate()

  let doc = parseXMLString(xmlData)
  defer: doc.release()

  let root = doc.getDocumentElement()
  echo "Root: ", root.tagName()

  for item in doc.getElementsByTagName("item"):
    echo "Item: ", item.textContent()

when isMainModule:
  main()

Build

nim cpp -r yourfile.nim

Note

Add the following lines to your .nimble

backend = "cpp"

License

MIT