 
 package spark.utils
 {
-	
+    
 import flashx.textLayout.conversion.ConversionType;
 import flashx.textLayout.conversion.ITextExporter;
 import flashx.textLayout.conversion.ITextImporter;

        
        trace(markup);

		var importer:ITextImporter = whiteSpaceCollapse == "collapse" ?
			collapsingTextLayoutImporter :
			preservingTextLayoutImporter;
		
		return importer.importToFlow(markup);
    }
    
    /**

        if (wrap)
        {
            markupToImport =  "<TextFlow xmlns=\"" + TEXT_LAYOUT_NAMESPACE + "\">" +
                              markupToImport +
                              "</TextFlow>";
        }
                
        var importer:ITextImporter = whiteSpaceCollapse == "collapse" ?
                                     collapsingTextLayoutImporter :
                                     preservingTextLayoutImporter;
        
        return importer.importToFlow(markupToImport);
    }

    /**
     *  Creates a TextFlow by importing (i.e., parsing) XML
     *  containing the markup language used by the Text Layout Framework.
     *  
     *  <p>An example of markup XML is
     *  <pre>
     *  &lt;TextFlow xmlns='http://ns.adobe.com/textLayout/2008'&gt;
     *    <p><span>Hello, </span><span fontWeight='bold'>World!</span></p>
     *  &lt;/TextFlow&gt;
     *  </pre>
     *  </p>
     *
     *  <p>However, you can use terser markup such as
     *  <pre>"Hello, <span fontWeight='bold'>World!</span>"</pre>.
     *  It will get wrapped with a TextFlow tag in the proper namespace,
     *  and span and paragraph tags will get automatically inserted
     *  where needed to comply with the structure of a TextFlow.</p>
     *
     *  <p>If you specify the TextFlow tag yourself,
     *  it must be in the correct XML namespace
     *  for runtime Text Layout Framework markup, which is
     *  <code>"http://ns.adobe.com/textLayout/2008"</code>.</p>
     *
     *  <p>Incorrect markup will cause this method to throw
     *  various exceptions.
     *  The error message will contain information
     *  about why it could not be parsed.</p>
     * 
     *  @param markup The markup XML to be imported.
     * 
     *  @param whiteSpaceCollapse A String indicating whether
     *  the whitespace in the markup should be collapsed or preserved.
     *  The possible values are
     *  <code>WhiteSpaceCollapse.COLLAPSE</code> and
     *  <code>WhiteSpaceCollapse.PRESERVE</code> in the
     *  flashx.textLayout.formats.WhiteSpaceCollapse class.
     *  The default value is <code>WhiteSpaceCollapse.COLLAPSE</code>.
     *
     *  @return A new TextFlow instance created from the markup.
     */
        public static function importFromXML(
        markup:XML, whiteSpaceCollapse:String = "collapse"):TextFlow
    {
        initClass();
        
        // If the root tag of the markup isn't a TextFlow tag,
        // wrap the markup with one, in the proper namespace.
        if (markup.localName() != "TextFlow")
        {
            // Create a root <TextFlow> element.
            var root:XML = <TextFlow/>;
