www.webdeveloper.com
Results 1 to 4 of 4

Thread: create XML

  1. #1
    Join Date
    Jan 2008
    Posts
    273

    create XML

    Hi All

    I need to create XML, for example, this is (simplified) what I have to
    do:

    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 ?

    cheers

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    jQuery is not meant for XML, use HTML instead to use with jQuery, or use the DOM with XML.

  3. #3
    Join Date
    Jan 2008
    Posts
    273
    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.

  4. #4
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    Quote Originally Posted by jeanluca View Post
    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?
    html is bascially the same as xml, dom wise.
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles