Skip to main content

[archive] XML PARSE statement issue

  • July 19, 2010
  • 1 reply
  • 0 views

[Migrated content. Thread originally posted on 14 July 2010]

I am trying to use the XML PARSE statement (ACU v 8.1.2) and I am not sure how it works. Does anybody has a small example for me ? I have coded the following :

WORKING-STORAGE.
1 M.
2 A pic x(21) value ''.
2 B pic x(24) value 'Hello World'.

PROCEDURE DIVISION.

Main Section.

XML PARSE M
PROCESSING PROCEDURE IS ProcessXMLEvent
ON EXCEPTION PERFORM XML-Exception
END-XML

However, at run time ProcessXMLEvent always receives :
XML-CODE = 23
XML-EVENT = EXCEPTION
XML-TEXT = Unknown symbol

I don't see what the problem is.....

Thanks,
- Peter-

1 reply

[Migrated content. Thread originally posted on 14 July 2010]

I am trying to use the XML PARSE statement (ACU v 8.1.2) and I am not sure how it works. Does anybody has a small example for me ? I have coded the following :

WORKING-STORAGE.
1 M.
2 A pic x(21) value ''.
2 B pic x(24) value 'Hello World'.

PROCEDURE DIVISION.

Main Section.

XML PARSE M
PROCESSING PROCEDURE IS ProcessXMLEvent
ON EXCEPTION PERFORM XML-Exception
END-XML

However, at run time ProcessXMLEvent always receives :
XML-CODE = 23
XML-EVENT = EXCEPTION
XML-TEXT = Unknown symbol

I don't see what the problem is.....

Thanks,
- Peter-
see attachment on how to use xml parse