COBOL XML PARSE equivalent of innerXML?

xlmpq

New Member
I'm trying to access the entire "< mynode >" node in the sample XML below, including start and end tags. I need to store that snippet of XML as XML in a database.\[code\]<a> <mynode > <c>Content</c> <c>More content</c> </mynode ></a>\[/code\]I have access to the XML PARSE function, and that's how I've been accessing node values, but I'm not sure how to use it to access an entire node.One option that came to mind was recording document locations where start-of-element and end-of-element XML-TEXT = 'b', and then taking that portion of the document, but that seems inelegant. Is there a better way?Edit: I count how many characters I've read into the document, and store that value when I reach the start and end of the "< mynode >" node. Then I can access the document with\[code\]STRING MY-DOCUMENT(MYNODE-START-POSE, (MYNODE-NODE-FINISH - MYNODE-NODE-START)) DELIMITED BY SIZE INTO MY-AREA\[/code\]
 
Back
Top