Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

help me

sukumarsukumar Posts: 1Member
iam now developing web page for online test(purely in xml) and there iam having some problem while appending(using appendchild)
like this

var ques=new ActiveXObject("microsoft.xmldom");
ques.async=false;
ques.load("question.xml");
when i made any changes to the file it affects only the object .it cannot alter the original xml file.how can i change the original xml file.pls help me .


Comments

  • ethan_robertsethan_roberts Posts: 6Member
    The changes you make are in-memory until you save them back to the xml data file. To do this, simply type:

    ques.save "question.xml"

    The next time you load the file, you'll get what you're looking for.

    By the way, another property you're probably going to want to start setting is:

    ques.async = false;
    ques.setProperty "SelectionLanguage", "XPath";

    this uses the W3C XPath spec instead of M$ backwards-compatibility with their own standard XPath. Save yourself some headaches :).

    Luck,

    Ethan
    : iam now developing web page for online test(purely in xml) and there iam having some problem while appending(using appendchild)
    : like this
    :
    : var ques=new ActiveXObject("microsoft.xmldom");
    : ques.async=false;
    : ques.load("question.xml");
    : when i made any changes to the file it affects only the object .it cannot alter the original xml file.how can i change the original xml file.pls help me .
    :
    :
    :
  • sharath_khsharath_kh Posts: 4Member
    After Appending to the XML file u have to save the XML file and then only u have to load it. u have to save it this way -
    ques.Save ""

    Good luck for u. U try this it would work.
Sign In or Register to comment.