Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml from a website 1

Status
Not open for further replies.

chessbot

Programmer
Joined
Mar 14, 2004
Messages
1,524
Location
US
Can i have people accessing my website add to my *.xml file? How??
 
with an internet web page, an xml source file cannot be updated by visitors if it's a HTML page. however, you could use ASP page or some other server-side technology to accomplish that. the basics would be to, at the time of submission from the web page for a change, create an xmldocument object, load the xml document into it ,then add/edit/delete whatever is posted back from the web page and save the xml document.

something like
Code:
dim xdoc as new xmldocument()
xdoc.load("document.xml")
..........
'code to add, edit or delete xml info
..........
xdoc.save("document.xml")

the exact details of the middle section would vary on your needs. but, you'd need to use a request object to get values from the posted form controls (ASP), perhaps use xpath to query the xmldocument object to determine where to add something or what to delete, etc. microsoft's msdn library has a lot of good info/references on how to work with an xml document and how to use xpath. check it out on their web site.

glenn
 
Thank you--I'll use that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top