[Flashcoders] adding whitespace back into xml

2006-01-09 Thread Jobe Makar
Hi guys, I was wondering if there was an algorithm in existence that will convert an XML instance into a string while adding white space back in (for readability). Thanks! Jobe Makar http://www.electrotank.com http://www.electro-server.com phone: 919-609-0408 mobile: 919-610-5754 fax:

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread eric dolecki
Could you do that with a special character in places to swap out with a linefeeds? Something like a ^ or some such thing? edolecki On 1/9/06, Jobe Makar [EMAIL PROTECTED] wrote: Hi guys, I was wondering if there was an algorithm in existence that will convert an XML instance into a string

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Sander
Why don't you just include html tags in your XML, so it becomes XHTML? You just take a couple of nodes and use them to set the htmlText property of a textfield? myData node type='XHTML-content' p ul liBullet 1/li

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Jobe Makar
-server.com phone: 919-609-0408 mobile: 919-610-5754 fax: 919-341-8104 - Original Message - From: Sander [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, January 09, 2006 2:14 PM Subject: Re: [Flashcoders] adding whitespace back into xml Why don't

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Jim Kremens
- Original Message - From: Sander [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, January 09, 2006 2:14 PM Subject: Re: [Flashcoders] adding whitespace back into xml Why don't you just include html tags in your XML, so it becomes XHTML? You

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Sander
Jode, Thanks, but modifying the source XML is not an option in this case. did you try loading the XML as plain text? Flash doesn't type-check file, so you could use a loadVars object and the XML would be plain text, all yours to search-and-replace as one big string :-) there was a

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Jobe Makar
: Monday, January 09, 2006 2:26 PM Subject: Re: [Flashcoders] adding whitespace back into xml I came across this on the web a while back: //original author http://www.wolfenhex.com public static function format(node, tab):String { if (tab == undefined) tab = ; if(node.nodeName == null) return format

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Dimitrios Bendilas
, Dimitrios - Original Message - From: Jobe Makar [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, January 09, 2006 9:21 PM Subject: Re: [Flashcoders] adding whitespace back into xml Hi Sander, Thanks, but modifying the source XML

Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Jobe Makar
@chattyfig.figleaf.com Sent: Monday, January 09, 2006 2:41 PM Subject: Re: [Flashcoders] adding whitespace back into xml Hi there Jobe, Try this. It works great for me. class util.XMLFormat { public static function formatXML(p_xml:XMLNode, p_tab:String):String { p_tab = (p_tab == undefined) ? \t : p_tab