473,387 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Insert data from XML doc into XHTML template

Hi all,

I've got two XML docs in memory as strings. One doc contains data, the
other contains an XHTML-based template with custom tags for my
application. What would be the best way to get the data into the
template? Right now the custom tags are in the form <xxx:field
name="fieldname"> ...#ItemData#... </xxx:field>. Where xxx is a custom
namespace prefix "field" is the actual tag name, and "fieldname"
corresponds to the tag in my data XML doc. #ItemData# is a placeholder
representing where the user wants me to insert the actual data from
the field.

My goal here is similar to many Content Management templates. However,
I want to have the option of easily adding new custom tags in the
future should the need arise. I thought about using XSLT, but I'm not
sure how to properly combine these two docs into a 3rd (and,
critically, these are both in-memory strings, not files, so I assume
document() might not work). Can someone point me in the right
direction. Or is there a better way to go about this?

TIA,
Kelly
Jul 20 '05 #1
1 1952
Post a simple example of what you have and what you want ...

Right now the custom tags are in the form <xxx:field name="fieldname">
....#ItemData#... </xxx:field>.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: FrankIsHere | last post by:
Hi! I cannot figure out how to remove XHTML tags from an XML source file using XSLT. Here's what I have: source XML file: <?xml version='1.0'?> <Offer ID="S0173"...
8
by: David Dorward | last post by:
I'm looking for an XSLT that I can use to transform XHTML 1.0 Strict into HTML 4.01. Does anyone know of a nice prewritten one? -- David Dorward ...
6
by: Rolf Welskes | last post by:
Hello, if I have for example: <table style="width: 100%; height: 100%;" border="1"> <tr> <td style="width: 100px">k </td> <td style="width: 100px">k </td> </tr>
21
by: =?iso-8859-2?Q?K=F8i=B9tof_=AEelechovski?= | last post by:
It is common knowledge that XHTML is better HTML and you can serve XHTML content as HTML. However, the second statement is incorrect, for various reasons; it is enough to say that the HTML...
2
by: blitzztriger | last post by:
Hello!! how do i insert values into mysql , after parsing a submiting textbox?? I made the arrays, so this should be a basic insertion of them in the db, but something is missing, or in the wrong...
5
by: a113n | last post by:
I have the following XSL code to handle textareas: <!-- Match TEXTAREA --> <xsl:template name="TEXTAREA" match="TEXTAREA"> <TEXTAREA ROWS="{@ROWS}" COLS="{@COLS}" NAME="{@NAME}"> <xsl:if...
0
by: Michael | last post by:
I know I am missing something simple, but I am stuck. When I submit the following for the employee info gets stored in scale1 and scale1 shows the employee number. Can someone show me my...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
0
by: bgreer5050 | last post by:
I know I am missing something simple, but I am stuck. When I submit the following for the employee info gets stored in scale1 and scale1 shows the employee number. Can someone show me my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.