ActionScript 2.0 :: MX2004: XPathAPI CDATA SelectSingleNode And HTML Formatting?
Oct 11, 2005
my subject is pretty much my problem, i am using MX2004's XPathApi 'selectSingleNode' which is working nicely, i have done a wee bit of fiddling;
Code:
_root.selectedText = "About Us "
centreMe.textContent.htmlText = mx.xpath.XPathAPI.selectSingleNode(this.firstChild,
[code].....
View 2 Replies
Similar Posts:
Dec 2, 2009
The CDATA is working for me, but it will not show certain HTML tags, such as
<ul><ul><li>
and
<up>
<ul><li> is fine, but if I do another level, second levels are on the first level.
View 1 Replies
Nov 25, 2007
this is my xml row and i wish to apply html formatting to info parameter at the end of line.
<marker name="Amar Yatri Niwas" address="Tourist Complex Area, Fatehabad Road," address2="Agra - 282001, Uttar Pradesh, INDIA" lat="27.160835" lng="78.033607" id="2" thumbpath="" type="hotel" category="3 Star Hotel" web="www.hotelamar.com" info="test2" />
TO
info="<b>test</b> <a href="test.htm">i am online</a>"
i know CDATA but i tried all the way and it didnt worked .
View 5 Replies
Nov 18, 2010
trying to work with "simple" XML for the first time. I'm building a small CMS for a Flash based site and the content is held in an XML file. My problem is that many of the copy fields are XML CDATA fields. on the one hand, with:
$xml = simplexml_load_file($file, 'SimpleXMLElement', LIBXML_NOCDATA);
I can pull the data out of that node and the CDATA tags are stripped. My issues come with trying to save the data with:
file_put_contents($file, $xml->asXML());
Problems are: a) tags are interpreted with their HTML entity equivalents. I don't want this to happen.I gather this is coming from the asXML method because even if I do anhtml_entity _decode on the $_POST data it's still being converted.
b) because of the above, there's no way to add the CDATA tags because they also have their charachters converted.
View 2 Replies
Jun 29, 2006
I have this XML File
<?xml version="1.0" encoding="ISO-8859-1" ?>[code]....
now, the problem ... I cant extract the [CDATA[57.14]],[CDATA[14.29]] & ![CDATA[28.57]] to use it ... I tried several things with firstChild,ChildNodes, but no luck ... any one has a simple solution to put all this in an Array so i can get the stuff out to use it ..
View 2 Replies
Feb 26, 2010
I would like create a text area with code highlighting in flex. Is there an advanced textArea witch suports css for real. For example:
myHtmltext:String = '<span class="keyword"> #include </span>';
myTextArea:TextArea = new TextArea();
myTextArea.htmlText = myHtmltext;
View 1 Replies
Jul 5, 2009
I have read through most of the numerous posts relating to this topic (and there are quite a few) but I am still unable to solve my problem. I have a simple AS2 script:
[Code]...
</example>Unfortunately (unless I am missing the concept of CDATA in xml) my text is rendered in flash as:see google <a href="http:google.com>here</a>My ultimate goal is to generate text in flash that is generated from xml and that have a link to external urls. I do not have much experience with xml in flash, i have been looking online but can't seem to figure out what to do. Any ideas?
View 4 Replies
Nov 7, 2007
there my load of xml goes okay but all html styles as... strong.. colorand image dont work what am I doing wrong
AS:
var mydata:XML = new XML("data.xml")
mydata.ignoreWhite = true;
[code]......
View 5 Replies
Jan 2, 2009
I'm trying to do a player roster for a sports team. I found on here as a template. However, I'm having a bit of an issue. I want to be able to format the xml using html in the xml file itself...for example I'd like to be able to insert pictures, make text bold, etc. using html tags in my dynamic text field. I enabled the "render as html" button thing. When I put
[Code]...
View 1 Replies
May 14, 2007
I am trying to avoid having to unescape URL encoded XML nodes by using a CData node element. It is a hassle to URL encode the html to put into the XML which is then read into Flash.This is what I have so far:
Code:
//Create XML with HTML 1.0 tags
myXML = new XML('<![CDATA[<p>This is a paragraph<br><a href='http://www.amazon.com'><b><u>Link to Amazon</u></b></a></p>]]>');
//
//Create dynamic html textfield
[code]....
I know that Flash does not fully support CData, but I'm sure there has to be some workaround.I did try sending the XML toString() but that didn't change anything.
htmlXML=myXML.toString();//create var for conversion from xml to string
I want the textfield to render the HTML--not just display the tags.
View 8 Replies
Dec 13, 2006
trying to convert data into XML and than be readble by flash, why can't macromedia be 'normal' and have some connector that can directly connect to a SQL database
Anyway enough about my rant...
I have a WYSIWYG html editor on my website that generates flash readable HTML code and we use PHP to store the information that is generated as a .xml file to be readable by our flash file. The data is passed via XML but trying to get the HTML tags through without the XML parser thinking its XML and interfering, and I've managed to research find the CDATA tag to pass information in (i dont know much XML, just basics to get it to work) but it doesn;t work!!
When I try to HTML code that is wrapped in the CDATA than it just shows as "null" on my flash file, but if i remove the CDATA tag and put in simple text it seems to work ok! even if i put in
Code:
<b>you better work, damn you!</b> this part is not bold, but doesnt show anyway
than the part in bold shows as bold but anything after that has disappeared
how I can effeciently put HTML into flash and get flash to successfully render it as HTML?!? note I've already used a .txt file unsucessfully and it seems to have LOTS of issues with special characters
View 1 Replies
Nov 19, 2009
Simple XML import with text and an html link and an image. For some reason the html tags are rendering as text, not html in the dynamic text field. I have looked at countless posts and tuts From all I've read I am doing things right, but obviously I am not. I must be missing something.ake a look at the attached code and explain where I am going wrong.XML File
Code:
<?xml version="1.0" ?>
<item>
[code].....
View 1 Replies
Jan 18, 2010
Does anyone know an XML editor with buttons to add HTML tags via CDATA?
<?xml version="1.0" encoding="UTF-8"?>
<content1>
<text1>
[Code]....
View 1 Replies
Nov 19, 2009
Simple XML import with text and an html link and an image. For some reason the html tags are rendering as text, not html in the dynamic text field. I have looked at countless posts and tuts but found nothing that helps. From all I've read I am doing things right, but obviously I am not. I must be missing something..[code]...
View 3 Replies
Aug 24, 2007
I need some very urgent help for a project that is on a tight deadline. I have a CDATA node that i'm loading into Flash that has some html in it. Let's just say this is it:
You are <font color='#FFFFFF'>very pretty</font>.<br><br>
When I trace out the xml after it is loaded into flash, it comes out as this:
You are <font color='#FFFFFF'>very pretty</font>.<br><br>
I need it to come through with the tags in tact. How do I go about this?
View 5 Replies
Oct 14, 2008
I am trying to get a link to work in the body text of a text block. I am using CDATA but can not get this to translate to html in the flash. I have checked that the 'Render text as html' box is checked.
Below is my AS and below that is my XML
========================
xml menu stripped down
======================
function CreateMenu(menu_xml) {
var items = menu_xml.firstChild.firstChild.childNodes;
for (var i = 0; i < items.length; i++)
[Code].....
View 2 Replies
Aug 25, 2008
I'm trying to include some JavaScript (JSON 2, to be precise)in with some ActionScript 3 classes. I'm using the inline XML method (E4X) of declaring the data. It looks like this:
public static var JSON_2:XML = <data><![CDATA[
if (!this.JSON) {
JSON = function () {[code]....
Actually, this is only about a quarter of what I need to include but this is where it breaks down. Right after the second slash in the last line, Flash reports: TypeError: Error #1091: XML parser failure: Unterminated CDATA section.
In fact, as you can see this is a perfectly valid CDATA section and isn't being terminated anywhere (there is no instance of "]]>" anywhere in the data). Unfortunately, Flash doesn't think so and seems to think that the backslash is an XML node directive. how to effectively deal with this? The JSON source code has *many* backslashes so not having to convert them would be *very* useful.
View 1 Replies
Nov 24, 2010
I have an application that was written with Flash Professional 8/AS2 and it parses XML for rendering dynamic media content. The XML pulls text with HTML markup out of CDATA sections and places them into an html enabled text field. Everything has worked wonderfully until Flash Player 10.
Now, if we use html escape characters for greater than or less than symbols, they are being decoded by the xml parser.
Here's my example CDATA section:
Here <u>we</u> go: This <node> <works>
when I grab its value using nodeValue or toString, the results are different from Flash Player 9 to 10. Here's what I'm getting:
[Code]....
In Flash 10, if I escape the ampersand, it will work, but this doesn't work in 9. for example, the following works in 10:
<![CDATA[Here <u>we</u> go: This <node> <works>]]>
This all happens before I assign it to a text field. How do I keep the parser from destroying my escaped characters in Flash 10? Do I just need to drop support for Flash Player 9 and go for what works in 10, or is there a solution for both?
View 2 Replies
Aug 14, 2008
I am trying to create an input text field which does not insert HTML formatting to whatever the viewer types in it. For example, if the viewer puts the text "hello" into the text box, the value of the box should not be[code]...
View 13 Replies
Jun 8, 2009
So I am bringing in a blog post via xml/rss feed to the clients website. Everything is working beautifully except for the formatting. I can get it to look like I want it on my end if I ascribe a TextFormat element however, I would very much like to keep the formatting that the user specifies when they create a new blog.
View 5 Replies
Feb 4, 2006
I've been trying to figure out a way to use html formatting inside an xml document and have accomplished it, but the only problem is that undefined is displayed before the text???So the final result when I test the flash file is:undefinedThis is bold textHow it works is the html tags in the xml document are written using the [ brackets instead.The function searches through the selected node(s) and converts the [] to <>
Heres the code:
ActionScript Code:
function xmlTags(xml)
[code].....
View 3 Replies
Apr 21, 2006
but this 2 days i've been searching this forum and cudn't get it right... here i attached the file with the post...I've been trying to format the text data from xml file into the dynamic text field.
View 1 Replies
May 27, 2009
I've searched all the web and Flash Help, found some tutorials but still can't make my dinamic text load a XML file with bold and italic on it.My dinamic text fild is set to HTML format and the XML is like that:[code]
View 2 Replies
Aug 24, 2002
I selected render text as html in flash, but it won't work. whenever i put in '<b> This is my bold text </b>' it doesn't work, it actually displays the html.
View 14 Replies
Jan 31, 2009
i am trying to form text with html. rending text as html is on. but the html is showing as test
my code: info = " Donna Bonessi <I>President</I>";
View 9 Replies
May 9, 2011
I have a question I was wondering if anyone had any experience with this problem. I'm importing an xml feed that is an article from my companies website. In the article there are html links. The xml is formatted with the link tags already. When I import into Flash the links are dead.
View 3 Replies
Mar 13, 2003
I know that with actionscript you can assign certain formating to the HTML text that you use within your Flash animation.
My question is if you can also use actionscript to do the following.
In HTML when you assign as FONT format... font face="verdana,arial" when the user does not have verdana installed, the browser automatically choses Arial (or whatever font you indicated and available on users system) as font to use.
Is the same thing possible within Flash HTML text?
Obviously to prevent that when people don't have the particular font you use for your HTML text, everything screws up
View 3 Replies
Dec 16, 2007
Basically I'm getting text from xml and placing it in a text field that is created inside a movie clip via movieClip.createTextField. I've got the odd bold word to deal with within standard body text, so I'm putting those inside the <b> html tags. My CDATA is set up fine and everything works perfectly when I'm just placing a textField on the stage in flash and enabling html rendering in the properties and etc, BUT when I create the textField in actionscript on a movie clip (because I'm using the height of the movie clip as the scrollable height) the text isn't actually bolded, the tags are just rendered as if they were any other text.As far as I can tell I've got my textField.html, textField.multiline and textField.wordWrap properties set correctly, so I'm not sure what's happening. [code]
View 8 Replies
Mar 2, 2009
I am trying to load formatted text from a XML file. It works when I load from a text file, but it ignores all formatting tags on a XML file. I guess it some problem with the data type.
View 8 Replies
Oct 29, 2003
I have a dynamic text box, which is fed text from an external text file. The "render as HTML" button is turned on. On the external text file, what is the HTML tag for centering text? I tried CENTER, but it failed.
View 5 Replies