Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml entities are not preserved #398

Closed
msklvsk opened this issue Apr 24, 2016 · 0 comments · Fixed by #482
Closed

xml entities are not preserved #398

msklvsk opened this issue Apr 24, 2016 · 0 comments · Fixed by #482

Comments

@msklvsk
Copy link

msklvsk commented Apr 24, 2016

In our team we encode all space characters other than plain space as entities so you can tell one from another. But they aren't preserved by read/serialize. Is it a bug or expected behavior? Is there any way to preserve them?

var libxmljs = require("libxmljs");

var doc = libxmljs.parseXml("<x>&#160;</x>");
console.log(doc.toString());  // outputs '<x> </x>' while original '<x>&#160;</x>' wanted
rhodgkins added a commit to bookcreator/libxmljs that referenced this issue Sep 6, 2021
rchipka added a commit that referenced this issue Mar 29, 2023
* Initial commit

Compile TS before testing

Typescript fixes

Test commit

Initial commit

* xmlNs refcounting

* build fixes

* Fix typescript version

* Deprecate version

* Fix config

* Fix test command

* Fix test command

* Fix build

* Fix build

* No Object.entries

* Increase call stack size

* Latest changes

* Use bin path

* Latest changes

* Disable sourceMaps on appveyor

* Latest changes

* Latest changes

* Documentation

* More changes

* Latest changes

* Include gyp version

* Change env variables

* Fix version

* Another attempt

* Another attempt

* Update

* Update

* GitHub Actions

* GHA

* GHA

* GHA

* GHA

* GHA

* GHA

* Remove appveyor

* GHA

* Init submodules

* Install msvc

* VS version

* Set version

* node version

* Latest changes

* Install build tools

* windows-build-tools

* Test

* test

* Remove appveyor

* feat: toString encoding (closes #482 and fixes #398) (#590)

* Latest changes

* Update package-lock.json

* Fix line endings

* More tests

* Fix typescript error

* Async

* Docs

* docs

* docs

* Docs

* Docs

* Docs

* Docs

* Docs

* Docs

* Add docs to gitignore

* Update readme

* Include version in docs

* Force add docs

* Restore build

---------

Co-authored-by: Rich Hodgkins <rhodgkins@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant