Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    wac
    wac is offline
    Regular Coder wac's Avatar
    Join Date
    Sep 2002
    Location
    Cary, North Carolina, USA
    Posts
    359
    Thanks
    2
    Thanked 0 Times in 0 Posts

    how to write out an XML Document object

    I realize some of this is trivial, but...
    Why is there not a write method on org.wc3.dom.Document?
    I can use it to parse a file but it seems that I have to write
    my own code to write Document back out once I've made updates. I know its "easy" to write this code, but somehow I thought that this was built into the object.
    Is that not true???
    Wayne Christian

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    http://www.w3.org/TR/2003/WD-DOM-Level-3-LS-20030226/

    The Load and Save interface takes care of all that.

  • #3
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,459
    Thanks
    1
    Thanked 23 Times in 21 Posts

    Re: how to write out an XML Document object

    Originally posted by wac
    I realize some of this is trivial, but...
    Why is there not a write method on org.wc3.dom.Document?
    document.write is a method provided in the HTML DOM specifically for backwards-compatibility with older browsers. With the Document Object Model Core, there should be no reason to force the XML parser to accept unparsed code directly from a script.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Posting Permissions

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