xml output
Moderators: chulett, rschirm, roy
xml output
Hi,
I am creating the xml file using the xml output stage.But in my source some of the fields have the NULL values.After creation of the xml file ,i am not finding the closed tag to those columns which are NULLs in source side.
I have checked the option "open and close tags" in transformation setytings of XML output stage.Still i am not getting the clsed tag in my final XML output file.
Got the output as :-
<CustDetails>
<CIFId>id123</CIFId>
<CustCompTyp />
<CustLang />
</CustDetails>
Please suggest.
I am creating the xml file using the xml output stage.But in my source some of the fields have the NULL values.After creation of the xml file ,i am not finding the closed tag to those columns which are NULLs in source side.
I have checked the option "open and close tags" in transformation setytings of XML output stage.Still i am not getting the clsed tag in my final XML output file.
Got the output as :-
<CustDetails>
<CIFId>id123</CIFId>
<CustCompTyp />
<CustLang />
</CustDetails>
Please suggest.
VASU..
I haven't tested all the variations with nulls and that setting, but from an xml perspective, it doesn't matter...
<CustLang/> and <CustLang></CustLang> are equivalent.
...provided however, that the person/application who is reading your document understands xml, and is using a normal xml parser. You should be fine.
Ernie
<CustLang/> and <CustLang></CustLang> are equivalent.
...provided however, that the person/application who is reading your document understands xml, and is using a normal xml parser. You should be fine.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Yes.there is an option like "open and close tags" in transformation settings of XML output stage.still i did not get the open and closed tags for NULL value columns.chulett wrote:I don't have any kind of access but it shouldn't be all that hard to find in the stage... should mention something about 'closing tags'.
VASU..
-
- Premium Member
- Posts: 238
- Joined: Fri Jul 25, 2008 8:55 am
Normally all XML parser's can read an empty tag in the format <empty/> which is equalent to <empty></empty>.
May I know the files you produced, are you viewing through any browser like internet explorer / mozilla etc.. if yes then it will by default show you in the format <empty/> but if you open the same file using notepad, you should be able to see the same in <empty></empty> format.
Please check that and let us know what you see in the file when you open it through the notepad.
Note. All parsers whether it is custom made / product based should follow W3C xml 1.0 standard. According to the standard the parser should read <empty/> and <empty> </empty> in the same way. Thanks.
May I know the files you produced, are you viewing through any browser like internet explorer / mozilla etc.. if yes then it will by default show you in the format <empty/> but if you open the same file using notepad, you should be able to see the same in <empty></empty> format.
Please check that and let us know what you see in the file when you open it through the notepad.
Note. All parsers whether it is custom made / product based should follow W3C xml 1.0 standard. According to the standard the parser should read <empty/> and <empty> </empty> in the same way. Thanks.
Thanks for the information.myukassign wrote:Normally all XML parser's can read an empty tag in the format <empty/> which is equalent to <empty></empty>.
May I know the files you produced, are you viewing through any browser like internet explorer / mozilla etc.. if yes then it will by default show you in the format <empty/> but if you open the same file using notepad, you should be able to see the same in <empty></empty> format.
Please check that and let us know what you see in the file when you open it through the notepad.
Note. All parsers whether it is custom made / product based should follow W3C xml 1.0 standard. According to the standard the parser should read <empty/> and <empty> </empty> in the same way. Thanks.
I have passed the same to users and waiting for the reply.
VASU..
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
empty tags
myukassign wrote:Normally all XML parser's can read an empty tag in the format <empty/> which is equalent to <empty></empty>.
May I know the files you produced, are you viewing through any browser like internet explorer / mozilla etc.. if yes then it will by default show you in the format <empty/> but if you open the same file using notepad, you should be able to see the same in <empty></empty> format.
Please check that and let us know what you see in the file when you open it through the notepad.
Note. All parsers whether it is custom made / product based should follow W3C xml 1.0 standard. According to the standard the parser should read <empty/> and <empty> </empty> in the same way. Thanks.
You are right but its <empty/> in the text editor then it shows <empty/> in browsers (NOT <empty> </empty> ). Its funny since i though browsers just show the text in the form of a tree (using a dtd)
Regards
Sreeni
Interesting... never knew that a browser would show something like an empty tag differently than it was in the source but just confirmed the behaviour for myself. But then it was never my tool of choice to check the validity of xml.
![Wink :wink:](./images/smilies/icon_wink.gif)
Third time that little tidbit has been mentioned in this thread.Normally all XML parser's can read an empty tag in the format <empty/> which is equalent to <empty></empty>.
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am