50 pts.
 XML-INTO with allowmissing option
if I use the xml-into command with allowmissing=yes, how can I tell if I recieved a tag name? allowmissing=yes will prevent it from giving an error but I want to know which tags I recieved. allowmissing=no will tell me I didn't get all my fields but I want to know which one I did receive. Is there a way to do that with xml-into?

Software/Hardware used:
ASKED: October 19, 2012  3:07 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. baumgardnd   50 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Is there a way to do that with xml-into?
 
The documentation for allowmissing=yes tells you how to tell if an element was missing, and even shows an example of coding to detect a missing element.
 
The way to tell if an element was not missing is simply the opposite of an element that was missing.
 
Tom

 107,915 pts.

 

I need to know that I got the element so I know what to do to the field in my database file. I was hoping for an option in xml-into that would tell me that I got a value in the field, or didn’t get a value in the field.
My data structure has 3 elements: Text 1A, Test 1S0 and Temp 3A.
My file contains Txt = ‘X’, Tst = 9 and Tmp = ’123′.
My doc just has <Temp>AAA</Temp>.
After the XML-into, Text will be a space, Test will be a zero and Temp will be ‘AAA’.
I don’t want to change Txt from ‘X’ to a space nor Tst from 9 to zero, I only want to change Tmp from ’123′ to ‘AAA’.

 50 pts.

 

After the XML-into, Text will be a space, Test will be a zero and Temp will be ‘AAA’.
 
That’s what you have after XML-INTO. But what was the value of [Temp] before XML-INTO?
 
Because the data structure is part of your program, you are responsible for setting an intial value of [Temp] before you run XML-INTO. If you set it to *LOVAL for example, you can test to see if it still has *LOVAL after you run XML-INTO. If the value has changed, you know that you received a new value.
 
I’m not sure how to clarify that.
 
Tom

 107,915 pts.