Re: XML closing and ending tag

26 views
Skip to first unread message

Justin Brian Hollander

unread,
Jun 11, 2013, 7:10:01 PM6/11/13
to vog...@googlegroups.com, junaid...@gmail.com
On Thursday, May 30, 2013 12:15:46 AM UTC-7, Ahmed Junaid wrote:
> Hi,
> In Java and XML - Tutorial(1.3. XML Elements) there is a line written i.e.A tag which does not enclose any content is know as an "empty tag". For example: <flag/> .
>
> So I have made XML object in java from String. If I give "<flag></flag>" after converting in xml object,it shows same as you have told in tutorial <flag/>. But can we do empty tag as <flag></flag> because my client has system that is not accepting <flag/>, it accepts only <flag></flag>. I have tried single space, new line , but that systems consider it as any value.I know <flag/> is standard for empty tag, can any body suggest what to do?

Look at endtags here:

http://en.wikipedia.org/wiki/XML#Key_terminology

Justin Brian Hollander

unread,
Jun 11, 2013, 7:26:00 PM6/11/13
to vog...@googlegroups.com, junaid...@gmail.com

Ignore my previous message. Are you familiar if your client parses xml as per the XML spec? It is possible it simply doesnt understand an "empty tag".

Justin Hollander

unread,
Jun 13, 2013, 1:14:59 PM6/13/13
to Junaid Ahmed, vog...@googlegroups.com
Hi Junaid,

If the client, as implemented, does not fully support the XML standard then you may be forced to change it or simply use the format that you are using now. I understand the difficulty you are having. Sometimes specifications are not fully enforced.

Justin.


On Thu, Jun 13, 2013 at 3:08 AM, Junaid Ahmed <junaid...@sapphirecs.net> wrote:
Hi,

Thanks for replying to me , I just wanted to know can we define empty tag as <flag></flag> or any technique to convert <flag/> to <flag></flag>. And I m familiar to xml that is why I m asking here i have put values in XML tags. but the system at client does not accept the standard. well for time being I am putting space  and it shows as <flag></flag> when printing xmlobject.



--
Regards:

Junaid Ahmed

Cell# +92-333-3659830
           

Reply all
Reply to author
Forward
0 new messages