Donald ,
I can't see how it gets to the write statement ?
MOREDATA = 1
LOOP WHILE (MOREDATA=1) DO
Cheers,
Angelo Collazo
Sr. Programmer
PNY Technologies, Inc.
Phone: (973) 560-5333
Fax: (973) 560-5280
E-Mail: [EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Don Verhagen
Sent: Monday, November 29, 2004 12:37 PM
To: [EMAIL PROTECTED]
Subject: [SPAM] - [U2] [UD] XML Parse/Open/ReadXMLData - Bayesian Filter
detected spam
I'm having a problem with creating an extraction file in Unidata 6.0.9
on HPUX 11.11i. It's not writting to the correct attribute as defined by
the dictionary item named in "field".
Simple XML Doc(test.xml):
<root>
<node1>Node1</node1>
<node2>Node2</node2>
<node3>Node3</node3>
</root>
-------------
Extraction Record (text.ext)
<?xml version="1.0"?>
<U2XML_extraction>
<file_extraction start="/root" dictionary="TEST.FILE" null="EMPTY"/>
<!-- UD.NODE3 is attribute 1 -->
<field_extraction field = "UDNODE1" path = "node1/text()" />
<!-- UDNODE3 is attribute 3 -->
<field_extraction field = "UDNODE3" path = "node3/text()" />
</U2XML_extraction>
-------------
Test Program
*$BASICTYPE "U"
SUBROUTINE B.TEST.XML
OPEN '','TEST.FILE' TO F.TF ELSE RETURN
*
XML.FNAME = "_XML_/test.xml"
EXT.FNAME = "_XML_/TEST.EXT"
*
STATUS = PREPAREXML(XML.FNAME,F_XML)
IF NOT(STATUS) THEN
STATUS = OPENXMLDATA(F_XML,EXT.FNAME,D_XML)
IF NOT(STATUS) THEN
MOREDATA = 1
LOOP WHILE (MOREDATA=1) DO
STATUS = READXMLDATA(D_XML,THIS.REC)
IF NOT(STATUS) THEN
WRITE THIS.REC ON F.TF,'DON.XML'
MOREDATA = 0
END ELSE
MOREDATA = 0
STOP 'XML ERROR'
END
END
REPEAT
*
STATUS = CLOSEXMLDATA(D_XML)
STATUS = RELEASEXML(F_XML)
END ELSE
PRINT 'OPENXML ERROR'
END
END ELSE
PRINT 'PREPARE ERROR'
END
-------------
Results of Test record (DON.XML) written to TEST.FILE:
<1> node1
<2> node3
-------------
Unidata appears to just be writing the data out sequentially rather than
using the attribute number in the dictionary item.
Any ideas?
Thanks,
--
Donald Verhagen
Application Development Manager
[EMAIL PROTECTED]
Tandem Staffing Solutions, Inc.
1690 S Congress Avenue, Suite 210
Delray Beach, FL 33445 USA
Voice Phone: 561.454.3592 Fax Phone: 561.454.3640
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
This e-mail message from PNY Technologies, Inc. is for the sole use of the
intended recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/