The package org.w3c.dom is accessible from more than one module: , java.xml

I had a similar issue because of a transitive xml-apis dependency. I resolved it using a Maven exclusion: <dependency> <groupId>org.apache.xmlgraphics</groupId> <artifactId>fop</artifactId> <version>0.95</version> <exclusions> <exclusion> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> </exclusion> </exclusions> </dependency> Another dependency that just causes trouble and I don’t have a solution other than removing it is this one: <dependency> <groupId>com.oracle.database.xml</groupId> <artifactId>xmlparserv2</artifactId> <version>${oracle.version}</version> </dependency> Use mvn … Read more

How to get list of registered custom elements

There is a way to check whether an element was registered. Registered elements have their own constructors, while unregistered ones would use plain HTMLElement() for constructor (or HTMLUnknownElement() whether the name is not valid, but this is out of scope of the question): document.registerElement(‘x-my-element’); document.createElement(‘x-my-element’).constructor //⇒ function x-my-element() { [native code] } document.createElement(‘x-my-element-not-registered’).constructor //⇒ function … Read more

Alternative for innerHTML?

The recommended way is through DOM manipulation, but it can be quite verbose. For example: // <p>Hello, <b>World</b>!</p> var para = document.createElement(‘p’); para.appendChild(document.createTextNode(‘Hello, ‘)); // <b> var b = document.createElement(‘b’); b.appendChild(document.createTextNode(‘World’); para.appendChild(b); para.appendChild(document.createTextNode(‘!’)); // Do something with the para element, add it to the document, etc. EDIT In response to your edit, in order to … Read more

Document.importNode VS Node.cloneNode (real example)

Alohci is right: there’s not much of a difference, since web compatibility forced the browsers to implicitly adoptNode() before inserting a node into another document. Before you insert the cloned node into a new document, there’s a difference: the owner document of the node returned by the cloneNode(original) is the same as of the original … Read more

How to unquote a urlencoded unicode string in python?

%uXXXX is a non-standard encoding scheme that has been rejected by the w3c, despite the fact that an implementation continues to live on in JavaScript land. The more common technique seems to be to UTF-8 encode the string and then % escape the resulting bytes using %XX. This scheme is supported by urllib.unquote: >>> urllib2.unquote(“%0a”) … Read more

Is there a valid way to wrap a dt and a dd with an HTML element?

No, Ian Hickson (HTML spec editor) is convinced that this is a CSS problem, not an HTML one: This shouldn’t be necessary. It’s a limitation of CSS. The right solution is for CSS to provide some pseudo-element or other mechanism that introduces an anonymous container into the rendering tree that wraps the elements you want … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)