Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best Solution for Removing Elements from XML document?

3 views
Skip to first unread message

Jay Myhre

unread,
Mar 28, 2010, 2:29:01 PM3/28/10
to
I've created an XML document from MS Access 2007. This document was created
from a combination of over 30 tables, some that are at the "grandchildren"
level (i.e., I have the parent, child, and grandchild levels). Because of
this I have have by necessity included primary and foreign keys in my tables.
These primary and foreign keys get written to the XML.
The XSD that I'm required to use prohibits the inclusion of these primary
or foreign keys. The rest of the XML is valid.
This is an XML document I will need to generate monthly so automating the
process would be very helpful.
What application would be best for deleting the primary and foreign key
elements from within the XML? Would it be Office XML or perhaps an XSLT
type application.
Thank you for any suggestions you can offer.

Jay Myhre

unread,
Mar 28, 2010, 5:19:01 PM3/28/10
to
Here is a sample of what I have:
...........
-<E01>
<FK_E01_01>2101700234</FK_EO1_01>
<E01_01>5234</E01_01>
<E01_02>324668</E01_02>
.......... etc, etc

Here is a sample of what I want it to look like after I do the transformation:

...........
-<E01>
<E01_01>5234</E01_01>
<E01_02>324668</E01_02>
.......... etc, etc

Peter Jamieson

unread,
Mar 30, 2010, 6:25:10 AM3/30/10
to
I'd say "go the XSLT transform route" but you may need to ask elsewhere
for the match specification you would need to to exclude these key
elements. Perhaps something like

match="//*[not(starts-with('FK_'))]

if the not and starts-with functions are recognised.

Peter Jamieson

http://tips.pjmsn.me.uk

0 new messages