Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:49:44+00:00 2026-06-05T16:49:44+00:00

So I have a xml document loaded in JavaScript variable. Xml looks like this:

  • 0

So I have a xml document loaded in JavaScript variable.

Xml looks like this:

<root>  
    <pp>test<ii>sample italic</ii> text after italic</pp>  
</root>

Then I have an input box where the content of <pp> element is written out.

Like this: test<ii>sample italic</ii> text after italic

Note that text in input box contains Xml tags.

User can then change the text in input box.
Like so: test<ii>sample BB italic</ii> and <bb>bold </bb> text after

Now I need to save this modified text back to Xml variable.

How do I do that?

EDIT 1
Question has nothing to do with saving to actual file. I just need to save/change modified data back to Xml variable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:49:45+00:00Added an answer on June 5, 2026 at 4:49 pm

    Maybe you could look at this link it would probably help you : http://www.ehow.com/how_5933380_change-values-xml-javascript.html

    Or here, those are two goo tutorial : http://www.devguru.com/features/tutorials/xml_javascript/xml_javascript.asp

    Are you reading your xml from a file ?

    To create a node :

    var theNewParagraph = document.createElement(‘p’);
    var theTextOfTheParagraph = document.createTextNode(‘Some content.’);
    theNewParagraph.appendChild(theTextOfTheParagraph);
    document.getElementById(‘someElementId’).appendChild(theNewParagraph);

    Taken from this : http://www.howtocreate.co.uk/tutorials/javascript/dombasics

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i have an XML document that looks like this: <?xml version=1.0 encoding=UTF-8?> <gesmes:Envelope
I have to load XML from external domain, so my code looks like this
I have this strange problem parsing XML document in PHP loaded via cURL. I
I have an XML document like this: <?xml version='1.0' encoding='UTF-8'?> <GateDocument> <!-- The document's
I have an xml file that looks like this: <args> <sometag value=abc /> <anothertag
I am using MSXML3 and have loaded an xml document which is a HTML
I have an XML document with a default namespace indicated at the root. Something
i have a large XML document that is to large to be loaded using
I have an loaded an XML document with the following structure: <?xml version=1.0 encoding=UTF-8
I have the following string loaded to an XML document: <?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.