Hi Bob,
I execute the following command and trap the output.
LIST filename key CLIENTID ORIGTRXREF INTERFACE TOXML ELEMENTS XMLMAPPING
xmlfilename.map (I
And here's my test extraction:
____________________________________________________________________________
_________
Program xxxx
*
STATUS=PrepareXML("&XML&/xmlfile.xml",filename_XML)
IF STATUS=XML.ERROR THEN
STATUS = XMLError(errmsg)
PRINT "error message ":errmsg
STOP "Error when preparing XML document "
END
STATUS = OpenXMLData(FILENAME_XML,'FILENAME.ext',FILENAME_XML_DATA)
IF STATUS = XML.ERROR THEN
STOP "Error when opening the XML document. "
END
IF STATUS = XML.INVALID.HANDLE THEN
STOP "Error: Invalid parameter passed."
END
MOREDATA=1
LOOP WHILE (MOREDATA=1)
STATUS=ReadXMLData(FILENAME_XML_DATA,rec)
IF STATUS = XML.ERROR THEN
STOP "Error when preparing the XML document. "
END ELSE
IF STATUS = XML.EOF THEN MOREDATA = 0
END
REPEAT
*
CRT "_________ Starting response ___________________"
STATUS = CloseXMLData(FILENAME_XML_DATA)
STATUS = ReleaseXML(FILENAME_XML)
cntr = 0
LOOP
REMOVE line FROM rec SETTING ATTB2
cntr += 1
PRINT cntr:" - ":line
WHILE ATTB2 DO
REPEAT
CRT "_________ End of response ___________________"
*
RETURN
____________________________________________________________________________
_________
Regards,
Jeff Marcos
BIS - Corporate Express Aust. Ltd
-----Original Message-----
From: Bob Witney [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 16 June 2004 12:22 AM
To: [EMAIL PROTECTED]
Subject: RE: [U2] U2 & XML
Many thanks to all who responded, except IBM who have been about as useful
as a 3 legged ferret!
Jeff
Where does the U2XMAP file fit in, I understand what a U2XMAP has in it but
how do I key the file so that it can pick up from my .ext ?, it seems to
need it
Bob
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jeff Marcos
Sent: 15 June 2004 01:56
To: '[EMAIL PROTECTED]'
Subject: RE: [U2] U2 & XML
Hi Bob,
Just recently I started working with XML in universe, using the same
routines as you and have no problem with creating and reading in XML. The
only difference I found was the use of the following line in the .ext is in
&XML&. I don't mention this at all.
0002: <U2xml-extraction
xmlns:U2xml="xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05
OTA_PingRQ.xsd">
Here's a sample of my .map in &XML&
Map to a XML file:
0001 <U2xml root="ceXML"/>
0002 <U2xml record="PaymentRequest"/>
0003 <U2xml file="FILENAME"
0004 field="CLIENTID"
0005 map-to="ClientID"
0006 treated-as="element"
0007 />
0008 <U2xml file="FILENAME"
0009 field="ORIGTRXREF"
0010 map-to="OriginalTransactionReference"
0011 treated-as="element"
0012 />
0013 <U2xml file="FILENAME"
0014 field="INTERFACE"
0015 map-to="Interface"
0016 treated-as="element"
0017 />
Here's a sample of my .ext in &XML&
To extract:
0001 <U2xml_extraction>
0002 <file_extraction start = "/Payment" dictionary = "VOC"/>
0003 <field_extraction field = "USERID" path = "PaymentHeader,UserID/text()"
/>
0004 <field_extraction field = "UNIQUEID" path =
"PaymentHeader,UniqueID/text()" />
0005 </U2xml_extraction>
regards,
Jeff Marcos
-----Original Message-----
From: David Jordan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 15 June 2004 9:05 AM
To: [EMAIL PROTECTED]
Subject: RE: [U2] U2 & XML
Hi Bob
There are many using xml to inteface to U2. Some are doing it through
RedBack, or they created their own parsers before u2 implemented one or they
are using the client such as .Net or java to parse xml. There are a few who
use the U2 interface, but maybe away from the office at the moment.
Regards
David Jordan
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob Witney
Sent: Monday, 14 June 2004 11:45 PM
To: [EMAIL PROTECTED]
Subject: [U2] U2 & XML
Hiya:
I send an email last week asking for help on an xml to U2 problem we have.
Since not a lot of response came back we are now wondering if any of you are
using xml to interface into U2
We are beginning to feel like pathfinders
Yeas or nays appreciated
Bob
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System. For
more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/