Adobe Community
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
ShowÂ
 onlyÂ
|
Search instead forÂ
Did you mean:Â
Global community
Language:
Deutsch
English
Español
Français
Português
日本語コミュニティ
Dedicated community for Japanese speakers
í•œêµ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Sign In
Exit
Home
ColdFusion
Discussions
How to Edit XML file?
Home
ColdFusion
Discussions
How to Edit XML file?
0
Upvote
How to Edit XML file?
Scooby_Doobie_Doo
Explorer
,
/t5/coldfusion-discussions/how-to-edit-xml-file/td-p/541926
May 23, 2007
May 23, 2007
Copy link to clipboard
Copied
I have an xml file that I've created, but inside is one are with no value that I need to edit and add a value to before submitting to my process.
For example, in the file is a field with no data like this
BSN=""
I need to open the file, find the BSN="" area, and add a number there like BSN="1" or BSN="2" then save the file.
Is this possible, if so what would be the best way to accomplish this with an xml file?
TOPICS
Advanced techniques
Views
512
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
6 Replies
6
Jump to latest reply
Newsgroup_User
LEGEND
,
/t5/coldfusion-discussions/how-to-edit-xml-file/m-p/541927#M49612
May 23, 2007
May 23, 2007
Copy link to clipboard
Copied
> Is this possible, if so what would be the best way to accomplish this with an
> xml file?
Read the CF docs here:
http://livedocs.adobe.com/coldfusion/7/htmldocs/00001505.htm
And the xpath and XSL stuff here:
- www.zvon.org
- www.w3schools.com
--
Adam
(Is there an echo in this forum?)
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
BKBK
Community Expert
,
/t5/coldfusion-discussions/how-to-edit-xml-file/m-p/541928#M49613
May 24, 2007
May 24, 2007
Copy link to clipboard
Copied
You could do it in a sequence like:
- <cffile action="read"> to read the xml file
- find and edit an element
- <cffile action="write"> to save the xml file
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Scooby_Doobie_Doo
AUTHOR
Explorer
,
/t5/coldfusion-discussions/how-to-edit-xml-file/m-p/541929#M49614
May 31, 2007
May 31, 2007
Copy link to clipboard
Copied
WHAT do I use to find and edit an element? I'v enever done this with xml at all, so this is all new to me.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
BKBK
Community Expert
,
/t5/coldfusion-discussions/how-to-edit-xml-file/m-p/541930#M49615
May 31, 2007
May 31, 2007
Copy link to clipboard
Copied
In Response To Scooby_Doobie_Doo
In this example we change the value of the
BSN
attribute of a
name
element from 2 to 5.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Scooby_Doobie_Doo
AUTHOR
Explorer
,
/t5/coldfusion-discussions/how-to-edit-xml-file/m-p/541931#M49616
Jun 01, 2007
Jun 01, 2007
Copy link to clipboard
Copied
In Response To BKBK
BKBK, thank you, that's what I'm trying to do, but I'm not sure how to get down to the level my data is at, it's buried a few layers deeper than that.
My BSN is in the attributes of the Indianaform which is three levels down. how do I navigae to that?
Instead of employee in your example, I have
master/forms/Indianaform
and I need to change the BSN attribute in the Indiana form element
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Scooby_Doobie_Doo
AUTHOR
Explorer
,
/t5/coldfusion-discussions/how-to-edit-xml-file/m-p/541932#M49617
Jun 01, 2007
Jun 01, 2007
Copy link to clipboard
Copied
LATEST
Nevermind, I figured out how to navigate to that line.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Â
Resources
Documentation
ColdFusion User Guide