I need to save and load an XML file to the server in a standard directory in order to display some nodes on the browser. How can I make a direct read-write access to the server from my back end code.
I’m not sure I understand your question. What kind of server? What kind of app? Where does the app run?
I USE THIS , LOCAL AND MINIMAC SERVER MAVERICK
Dim kTestXml As String
Dim xdoc as XmlDocument
Dim f as FolderItem
f = GetFolderItem("").child(“client.xml”)
xdoc = new XmlDocument(f)
I GET THIS INTERENT
Message: msg:unknown encoding ‘’
I GET THIS LOCAL
Sounds like you need to do a bit more debugging. What is the XML file? What is its encoding? XML files are typically UTF-8. Is this specified in its header? Are there invalid characters in the XML? Can you copy the file locally and open it?
I’ve found that opening problem XML files in something that tries to parse them (like the Firefox browser, strangely enough) often helps pinpoints what might be wrong.
THIS IS THE XML FILE :<?xml version="1.0" encoding="utf-8" ?> University of XML Department of XML parsing George Washington Abraham Lincoln Bill J. Clinton George W. Bush Barack H. Obama Song Li
THE kTestXml STRING is encode US-ASCII
I did various tests to transform the variable to UTF8, but without result. How can I do?
does it actually include the embedded newlines ?
Exception as XML Exception
Error number 69
I dont know about embedded newlines.
I copied your xml into a file and it opens fine. There must be some bad character in the original that didn’t transfer to the forum.
I created a new XML file with Dreamweaver and I deleted the old one. This always leads to the exception.
Zip the file & send it to me directly
Sounds like dreamweaver is creating a bad XML file
Even after saving the file Alain sent it opens fine with
Dim kTestXml As String Dim xdoc as XmlDocument Dim f as FolderItem f = GetOpenFolderItem("") // instead of getfolderitem("")..child("client.xml") so I can pick the file where I downloaded it xdoc = new XmlDocument(f) xdoc.LoadXML(f) MsgBox xdoc.ToString
Running tidy on it also says it’s valid as do a couple other online checkers
! This item does not exist.
I do not use the Pro version but the web application.
I do not know if it can change a few things.
After many tests.
The webapp run well on server, but not locally.
We will enjoy this wonderful winter full of snow.