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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you edit XML like you can edit SQL?

Status
Not open for further replies.

DeanBarnes

Programmer
Aug 2, 2006
9
GB
I am watching the series of videos by Bob Tabor that you get from the Microsoft site and in one of them he makes a "thing" for want of a better word that looks a bit like Excel and lets you edit SQL a bit like you would in Excel. Basically, I want to know if you can do this in XML because I have an address book type thing made in XML already

Cheers for the help
 
There are a number of good XML editors available. I like XMLSpy (free for home use, but with a reduced feature set).

Visual Studio will also edit XML files, but it's a bit clunky.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Sorry, I guess I was kind of unclear. I was hoping to make something of my own to edit something specific. I have all my contacts in an XML file and wanted to make myself a little something that makes editing easy :) Sorry for the confusion
 
Dean,

Yes. You can do this in XML - XML is just a datasource, such as a dataset returned from a database (using SQL). The added complexity of XML over a standard dataset (rows & columns) is the fact that it is hierarchical, and can be many levels deep (almost infinitely so), as well as having attributes etc. This makes dynamic/generic editing of XML data more complicated than 'flat data' from a database table (excluding nested datasets of course), which is well suited to a spreadsheet format.

I suggest you check out XML Spy as chiph notes just to see how they have handled it - it might open your eyes to the difficulties of making it generic...

however...

If you have a pretty fixed structure that you own and manage, then it should be pretty simple to read and write to that source and present it in whatever way you wish. For example you can iterate over the <contacts> nodes for each record against a contact and show the sub elements (e.g. name, phone number, title, position, address line 1 etc) as columns within the spreadsheet.

If you want more specific guidance, then you will need to be more specific in your question.

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Cheers guys :) I'll ask a more specific question when I get back to doing it. Just got myself a proper website so playing with that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top