The only way I've found is to set the value to " ", then you'll get a
start/end tag - but there will be a space in there. Not sure if that
will mess up your translation company or not. 

chn = xmlElemNew(xmlTranslate, 'chn');
chn.xmlText = " ";
arrayAppend(root.xmlChildren[i].xmlChildren, chn);

---nimer

> -----Original Message-----
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 14, 2005 9:41 AM
> To: CF-Talk
> Subject: XML - force empty tag <tag></tag>
> 
> Hey all...
> 
> Getting my feet wet with XML and CF.
> 
> Generating an XML file that we're going to send to a translation
> vendor to give us Chinese translations of English text.
> 
> So a sample node from the file might look like:
> 
> <question id="5">
>      <eng>This is the first question</eng>
>      <chn />
> </question>
> 
> The vendor has asked that the file have <chn></chn> instead of <chn />
> because it would save them a few minutes (there will be potentially
> thousands of records for translation).
> 
> Right now, a snippet of the code I'm using is:
> 
>       chn = xmlElemNew(xmlTranslate, 'chn');
>       chn.xmlText = "";
>       arrayAppend(root.xmlChildren[i].xmlChildren, chn);
> 
> ....which generates the <chn />.  Is there a way to force empty tags
to
> not use the shortcut notation and explicitly output an opening/closing
> tag pair?
> 
> --
> Charlie Griefer
> 
> ================================================
> "...All the world shall be your enemy, Prince with a Thousand Enemies,
> and whenever they catch you, they will kill you. But first they must
catch
> you, digger, listener, runner, prince with a swift warning.
> Be cunning and full of tricks and your people shall never be
destroyed."
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218204
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to