I have a button to initialize the XML tree:
Code: Select all
--button init tree
global idID
on mouseUp pMouseButton
if revXMLTrees() is not empty then revXMLDeleteAllTrees
put "<identity></identity>" into tData
put revCreateXMLTree (tData, true, true, false) into idID
revXMLAddNode idID, "/", "name", ""
revXMLAddNode idID, "/", "surname", ""
end mouseUp
Code: Select all
--button add&write
global idID
on mouseUp pMouseButton
revXMLPutIntoNode idID, "/identity/name", textEncode (field "name_source" ,"UTF8") -- fld contains "André"
revXMLPutIntoNode idID, "/identity/surname", textEncode (field "surname_source" ,"UTF8") -- fld contains "Malraux"
answer revXMLText (idID) -- the accented char is there
put revXMLText (idID) into URL You can’t post image, email or url links that are external to this domain. -- no readable accented char in there
-- same result with binfile: OR file:
end mouseUp
Code: Select all
--button read
on mouseUp pMouseButton
put url (You can’t post image, email or url links that are external to this domain.) into tMyXML
put revXMLCreateTree(tMyXML, false, true, false) into tTree
put revXMLNodeContents(tTree, "identity/surname") into tSurname
put revXMLNodeContents(tTree, "identity/name") into tName
put textDecode (tSurname, "UTF-8") into fld "surname_target" -- fld reads "Malraux"
put textDecode (tName, "UTF-8") into fld "name_target" -- fld reads "André"
end mouseUp
The problem is the file You can’t post image, email or url links that are external to this domain.
Code: Select all
<?xml version="You can’t post image, email or url links that are external to this domain."?>
<identity><name>André</name><surname>Malraux</surname></identity>
Code: Select all
<?xml version="You can’t post image, email or url links that are external to this domain."?>
<identity><name>André</name><surname>Malraux</surname></identity>
I'm certainly missing something obvious.
Any hint ?
CL
Sorrry for
You can’t post image, email or url links that are external to this domain.
that replaces snippets not allowed in this forum
It's not my point today, but help would be appreciated