BlueAlien
asked on
Load XML to ADODataset
Hi.
Is there a way to load a XML string into an ADODataset without using midas or a transform file?
Sample XML:
<?xml version="1.0" encoding="ISO-8859-2" ?>
<Ticket>
<DATA type="D" value="DC_HEADER" align="C" face="Arial" size="8" style="N" voffset="0" mroffset="-5"/>
<DATA type="HL" voffset="-2"/>
<DATA type="D" value="DC_FOOTER" voffset="0"/>
</Ticket>
Thanks.
Is there a way to load a XML string into an ADODataset without using midas or a transform file?
Sample XML:
<?xml version="1.0" encoding="ISO-8859-2" ?>
<Ticket>
<DATA type="D" value="DC_HEADER" align="C" face="Arial" size="8" style="N" voffset="0" mroffset="-5"/>
<DATA type="HL" voffset="-2"/>
<DATA type="D" value="DC_FOOTER" voffset="0"/>
</Ticket>
Thanks.
This data cannot be transformed as is. More information is needed
My XMLTable control will not save back to the table, only create the
XML file from the dataset results and it uses a standard format. The
default format is the same as Oracle 8 used for importing.
My XMLTable control will not save back to the table, only create the
XML file from the dataset results and it uses a standard format. The
default format is the same as Oracle 8 used for importing.
If you have a schema for your ADODataset that you can show and how the XML data corresponds,
I'm sure someone may write a parser for you.
I'm sure someone may write a parser for you.
ASKER
It looks like this (column name, data type, max length):
type, string, 2
value, string, 50
align, string, 1
face, string, 30
size, string, 2
style, string, 1
voffset, string, 5
mroffset, string, 5
break, string, 1
The problem is, that I need to keep the XML file as easiest to edit as possible. Or if you could suggest some other XML format (I don't know very much about XML). I could write my own parser for this specific format, but than I'll have to modify it every time a change occurs.
type, string, 2
value, string, 50
align, string, 1
face, string, 30
size, string, 2
style, string, 1
voffset, string, 5
mroffset, string, 5
break, string, 1
The problem is, that I need to keep the XML file as easiest to edit as possible. Or if you could suggest some other XML format (I don't know very much about XML). I could write my own parser for this specific format, but than I'll have to modify it every time a change occurs.
Ok, give me a little while and I'll write a parsing routine for you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I forgot to mention that the Memo on the form has the XML text.
Oh, and you can remove the persistant fields from ADOTale1, too.
ASKER
Thanks for the parser, it works perfectly.
PS: Why do you have to remove #13 and #10?
PS: Why do you have to remove #13 and #10?
You don't want the extra whitespace in the XML when parsing.
https://www.experts-exchange.com/questions/21586387/Is-there-any-way-to-export-record-in-xml-from-ado.html
you might need to save the xml file from an adodataset first to see exactly the formatting before loading (just to make sure you follow the same formatting rules)