I want to have files like this:

File1.xml

<titletag>
Title1 goes here
</titletag>

<contenttag>
Content1 goes here
</contenttag>

and then use this data with something like:

<html>
<body>
...

Place <contents of titletag from File1.xml> here

</html>

Is this a reasonable request? How would I do such a thing?

Thanks,

David

Not sure daviddoria, but you could parse the XML in javascript.

Is there no "built in" function to extract the contents of a tag? This seems like a pretty basic thing to do - if it is no built in, does anyone have a script that I could use?

The goal is to do this:

<html>
...

<a href=...> <Event1 Title> </a>
<a href=...> <Event2 Title> </a>
...
</html>

Where I can have the same "template", a page that displays the <Event N title> and <Event N Body>. I currently have Event1.html, ... EventN.html but it seems silly to have the same code copied over and over in all of the Event*.html pages, so I was trying to have an EventTemplate.html and "pass" it the contents of the Nth event to display (which were extracted from the <titletag> and <bodytag> tags of the "xml" style file.

Any thoughts?

Thanks,

David

Hey David

Glad you solved it. I thought that you should be able to find something on that link that will help you, and you did.

Good luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.