Modify External XML Document

D

Dataman

Using ACC2003 and exporting a query as a xml file. When I do this, the file
looks like this:
--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<dataroot xmlns:blush:d="urn:schemas-microsoft-com:blush:fficedata"
generated="2008-01-23T14:54:12">

<DMRValuesItem>

<DMRRptId>263999</DMRRptId>

<DMRValId>6416445</DMRValId>

<PermitNum>WY0001234</PermitNum>

<Outfall>2341</Outfall>

<SBCode>cDX</SBCode>

<ParamID>30</ParamID>

</DMRValuesItem>

</dataroot>

------------------------------------------------------------------------------

The first two lines need to be removed and replaced with the
"<DMRValuesSet>" string right above "<DMRValuesItem>" string

The last line "</dataroot>" needs to be replaced with </DMRValuesItem> above
"<DMRValuesSet>"

The finished document should look like this:

<DMRValuesSet>

<DMRValuesItem>

<DMRRptId>263000</DMRRptId>

<DMRValId>6477739</DMRValId>

<PermitNum>WY0012345</PermitNum>

<Outfall>035</Outfall>

<SBCode>cDX</SBCode>

<ParamID>30</ParamID>

</DMRValuesItem>

</DMRValuesSet>

After I export the document I need to programmatically modify the document
as show above. I alread have the filename and path as a variable. This
document MUST be formatted as shown in the second example.

If someone has a code example please post it.

Thanks in advance for any help offered.

DM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DAO and XML 1

Top