Locked
1
Reply
1
0
How to set XML.ignoreWhitespace = false; in HttpService /Result?
New Here
,
/t5/flex-discussions/how-to-set-xml-ignorewhitespace-false-in-httpservice-result/td-p/1137946
Nov 17, 2008
Nov 17, 2008
Copy link to clipboard
Copied
I want to carry/preserve Leading & trailing spaces<white spaces> in event's result....<br />I am using service as :<br /> _webService = new HTTPService();<br /> _webService.url = serviceUrl;<br /> _webService.method = "POST";<br /> _webService.resultFormat = "e4x";<br /> ......<br />...Again i am checking it as -in<br />private function serviceResultHandler(event:ResultEvent):void<br /> {<br /> stopExecution();<br /> var doc:XMLDocument = new XMLDocument();<br /> doc.ignoreWhite = false;<br /> XML.ignoreWhitespace = false; <br /> doc.parseXML(event.result as XML);<br /> Alert.show(event.result.toString(),"....serviceResultHandler...");<br /><br />But, i am not able see L&T spacesin alert() where I can see L&T spaces in Servlet/Java side which assigned as metaResponse<br />as....<br /> OutputStream writer = response.getOutputStream();<br /> OutputStreamWriter outputStreamWriter = new OutputStreamWriter(writer,"UTF-8"); <br />JaxbSerializationUtil.serializeObjectToWriter(outputStreamWriter, metaResponse);
TOPICS
Developers
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
_venubwal_
AUTHOR
New Here
,
LATEST
/t5/flex-discussions/how-to-set-xml-ignorewhitespace-false-in-httpservice-result/m-p/1137947#M2546
Nov 18, 2008
Nov 18, 2008
Copy link to clipboard
Copied
By Using XML.ignoreWhitespace = false; <br />I am able to Store/Carry/Save L&T white spaces in XML and i can retrive values with whitespaces...<br /><br />It is in case of loading from Java<DB> to Flex.<br /><br />But the actual problem is with xmlObject.toString()/toXMLString()<br />is not able to carry whitespace, while it should carry as parameter to Java Servlet..so that it can be get using request.getParameter() [..then it is serializing/deserializing]<br /><br />So, how i can preserve the L&T whiteSpaces on XML.toString()/toXMLString() method.<br /><br />OR else<br />How we can set Http request attribute in Flex, so that we can use ( AnY_Object)request.getAttribute()...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
