K
knowbetter
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
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