1. #1
    Ext User
    Join Date
    Dec 2008
    Posts
    14
    Vote Rating
    0
    eXergo is on a distinguished road

      0  

    Question [Solved]Printing XML

    [Solved]Printing XML


    Hi!

    I'm trying to print a XML object into a Panel. My objects comes into a JSON object from server.
    The data is printed into the panel, but all tags are missed. I only can see them if I look at source code of the page.
    Is there any way to format my XML? I couldn't find it anywhere.

    thanks in advance
    R.H.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Use Ext.util.Format.htmlEncode.

  3. #3
    Ext User
    Join Date
    Dec 2008
    Posts
    14
    Vote Rating
    0
    eXergo is on a distinguished road

      0  

    Default


    OK!
    It works. And last question, is it possible to 'format' the XML to show it like "pretty print"? or I'll have to proccess it?

    thanks a lot

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You'll have to do the formatting yourself.

    ps. You're not actually showing XML, you are showing a string.

  5. #5
    Ext User
    Join Date
    Dec 2008
    Posts
    14
    Vote Rating
    0
    eXergo is on a distinguished road

      0  

    Default


    ok. thanks!

Thread Participants: 1