I need to create XML, for example, this is (simplified) what I have to
var x = jQuery.makeXML('<myXML><version>8.1</version></myXML>) ; //
this line is my problem!!
console.log("Version = %s", $('version', x).text() ) ;
Is this possible and what is the best way to do this ?
jQuery is not meant for XML, use HTML instead to use with jQuery, or use the DOM with XML.
ok, but is it possible to create a DOM with the tags given in my first post ?
I assume that with the tags I'm using I cannot create HTML, right?
Last edited by jeanluca; 08-21-2009 at 06:28 AM.
html is bascially the same as xml, dom wise.
Originally Posted by jeanluca
you sould be able to use "fake" tags just fine.
issues arrise when you have tags called "HTML", "SCRIPT", "A", etc that have special meanings to HTML. namespaces can also be a problem.
other than that you can pretty much use whatever tags you want.
since it won't be hard-coded, you don't need to worry about validation.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)