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

Elements are not correctly created in the w namespace #2

Open
therealglazou opened this issue Dec 22, 2012 · 0 comments
Open

Elements are not correctly created in the w namespace #2

therealglazou opened this issue Dec 22, 2012 · 0 comments

Comments

@therealglazou
Copy link

|newXMLnode()| seems to me wrong since it creates nodes in the "http://schemas.openxmlformats.org/wordprocessingml/2006/main" namespace through

var el = doc.createElement('w:' + name);

The DOM Core specs explicitely say that in that case, el has localName, prefix, and namespaceURI set to null...
A more correct code is

   var el = doc.createElementNS("http://schemas.openxmlformats.org/wordprocessingml/2006/main", name);
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

No branches or pull requests

1 participant