newbie27
asked on
how to convert space into under score and vice versa
Hello Experts,
I am posting some information(data) to the proxy.asp which would accept the data being sent and saves into the XML file.
Later in the application I pull the details matching with one of the node, name, this works as long as if there is only one word name.
If I have the space in the name then it is breaking.
Can someone please advice how to convert the spaces into underscore before the saving it into the xml file?
I hope someone can help.
thanks
sam
I am posting some information(data) to the proxy.asp which would accept the data being sent and saves into the XML file.
Later in the application I pull the details matching with one of the node, name, this works as long as if there is only one word name.
If I have the space in the name then it is breaking.
Can someone please advice how to convert the spaces into underscore before the saving it into the xml file?
I hope someone can help.
thanks
sam
which "names" do you refer to?
coming from this question, please clarify the data you mean.
https://www.experts-exchange.com/questions/23556943/deleting-data-from-the-xml-file.html?anchorAnswerId=22017658#a22017658)
coming from this question, please clarify the data you mean.
https://www.experts-exchange.com/questions/23556943/deleting-data-from-the-xml-file.html?anchorAnswerId=22017658#a22017658)
ASKER
Hello angelll,
thanks for looking this for me, If you please see the attached xml file, I am referring to
testall
if it is test all with space between, i would like to make it as test_all
ex: test_all
does this makes any sense to you angellll ?
thanks for looking this for me, If you please see the attached xml file, I am referring to
testall
if it is test all with space between, i would like to make it as test_all
ex: test_all
does this makes any sense to you angellll ?
<lists>
<username>test@test.com</username>
<listitem>
<listname>testall</listname>
<listnotes>testing</listnotes>
<listrefs>
e2007092018174409,e2007091011024965,e2007091011113098
</listrefs>
<itemnotes>null,null,null</itemnotes>
<last_updated>20080716|16:52:48</last_updated>
</listitem>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Hello Angellll,
Thanks for your comment.
Well it seems to me that these spaces does matter when I pull them and show in the drop down list box, user can select the name from the list and view their details in the Flexigrid on the page.
I also have another field called "notes" which are associated with the listRefs in the xml file.
http://213.253.134.6/artism/admin/list_admin.asp#testall
if you please go to this page, and from the SELECT you can either testAll and test All and see the difference ...
if you have space in the name, although there is different value in the notes field
http://213.253.134.6/artism/admin/lists/data/test@test.com.xml
it is not showing in the grid, you can also add your own notes and save the record ( ignore the over write warning and save it) to see that for other list it works as normal but not not for the one with space...
hope you see what i am trying to say you here?
i have another jQuery issue on the page, do you think you can help me on the Facebox as well please?
Thanks for your comment.
Well it seems to me that these spaces does matter when I pull them and show in the drop down list box, user can select the name from the list and view their details in the Flexigrid on the page.
I also have another field called "notes" which are associated with the listRefs in the xml file.
http://213.253.134.6/artism/admin/list_admin.asp#testall
if you please go to this page, and from the SELECT you can either testAll and test All and see the difference ...
if you have space in the name, although there is different value in the notes field
http://213.253.134.6/artism/admin/lists/data/test@test.com.xml
it is not showing in the grid, you can also add your own notes and save the record ( ignore the over write warning and save it) to see that for other list it works as normal but not not for the one with space...
hope you see what i am trying to say you here?
i have another jQuery issue on the page, do you think you can help me on the Facebox as well please?
FUNCTION CleanXML(T)
T = Replace(T, "&", "##38;")
T = Replace(T, "'", "##39;")
T = Replace(T, """, "##34;")
T = Replace(T, "<", "##60;")
T = Replace(T, ">", "##62;")
T = Replace(T, "&#", "##")
T = Replace(T, "&", "&")
T = Replace(T, "##", "&#")
T = Replace(T, "<", "<")
T = Replace(T, ">", ">")
T = Replace(T, "£", "£")
T = Replace(T, VbCr, ",")
T = Replace(T, VbLf, ",")
T = Replace(T, VbCrLf, ",")
T = Replace(T, ",,", ",")
'T = Replace(T, chr(150), "-")
'T = Replace(T, chr(145), "'")
'T = Replace(T, chr(146), "'")
'T = Replace(T, chr(133), "...")
CleanXML = Trim(T)
END FUNCTION
'###############################################################################
ASKER
angelll,
i have use your code and have replace all the spaces as that was spoiling other things...
please can you help me in my other jQuery issues angellll?
i have use your code and have replace all the spaces as that was spoiling other things...
please can you help me in my other jQuery issues angellll?
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23569037.html
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23565966.html
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23570227.html
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_23569316.html
ASKER
thanks
ASKER
i am concerned for this
Set objListItem = objXML.createElement("list
objListItem.text = CleanXML(sListName)
objList.appendChild objListItem
Open in new window