PDA

View Full Version : Span values are not coming in html



sujan.dasmahapatra
27th June 2013, 16:45
I am writing the page as html. where the span values are question mark. no values are displayed.



out << m_WebView->page()->currentFrame()->toHtml() << "\n";



var msg_proce = "<span style=color:red>??????...</span>";
var msg_success = "<span style=color:red>????</span>";
<span style=font-size:15px;color:red>??????????,<a href=?action=valet.ordersell>????</a></span>

HOW CAN I GET THE SPAN VALUES. PLEASE HELP.

ChrisW67
28th June 2013, 00:16
I assume by "span values" you mean the span element text. You access that directly with QWebElement::toPlainText().

If you are complaining because you are writing the HTML to a text stream (of some unspecified nature) and cannot read it afterward then you need to be sure that the file encoding is correct in both the writer and whatever you are inspecting the result with. Saving, for example, UTF-8 encoded Hindi text to a Latin1 stream or reading it in a Latin1 editor will not be satisfying (often displaying a placeholder character for bytes it cannot make sense of). Exactly what you have there is unknown to us, for all we know the span elements actually contain question marks.