На первый взгляд противоречивое поведение среди подклассов NSManagedObject

Использование тегов скриптов:

  • добавить блок <script>...</script>, содержащий ваш многострочный текст в тег head;
  • получить ваш многострочный текст как есть ... ( следить за кодировкой текста: UTF-8, ASCII)
    <script>
    
        // pure javascript
        var text = document.getElementById("mySoapMessage").innerHTML ;
    
        // using JQuery's document ready for safety
        $(document).ready(function() {
    
            var text = $("#mySoapMessage").html(); 
    
        });
    
    </script>
    
    <script id="mySoapMessage" type="text/plain">
    
        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="...">
           <soapenv:Header/>
           <soapenv:Body>
              <typ:getConvocadosElement>
                 ...
              </typ:getConvocadosElement>
           </soapenv:Body>
        </soapenv:Envelope>
    
        <!-- this comment will be present on your string -->
        //uh-oh, javascript comments...  SOAP request will fail 
    
    
    </script>
    
1
задан westsider 14 October 2010 в 18:27
поделиться