Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to post raw XML in github comment

Tags:

github

xml

I am attempting to display some raw xml in a github comment, and I'm buggered if I can get it to show up.. when I paste it and save, the tags are interpreted and I only get content. But the comment is intended to show what needs to be sent to a third party app.

Here's what I want to insert as comments.

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:catalogCategoryTree soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string" xs:type="type:string" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">blablaa</sessionId>
         <parentId xsi:type="xsd:string" xs:type="type:string" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">?</parentId>
         <storeView xsi:type="xsd:string" xs:type="type:string" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">?</storeView>
      </urn:catalogCategoryTree>
   </soapenv:Body>
</soapenv:Envelope>

Here's what gets presented to my co-workers

soapenv:Header/
soapenv:Body

blablaa
?
?
/urn:catalogCategoryTree
/soapenv:Body
/soapenv:Envelope

Is there a way to make what I type show up?

like image 782
baash05 Avatar asked May 08 '13 07:05

baash05


1 Answers

You can use the triple back-tick (```) to multi-line quote code within comments. If you want syntax highlighting, you can also specify the language:

```xml
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
    <soapenv:Header/
    <soapenv:Body>
        <urn:catalogCategoryTreevsoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <sessionId xsi:type="xsd:string" xs:type="type:string" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">blablaa</sessionId>
            <parentId xsi:type="xsd:string" xs:type="type:string" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">?</parentId>
            <storeView xsi:type="xsd:string" xs:type="type:string" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">?</storeView>
        </urn:catalogCategoryTree>
    </soapenv:Body>
</soapenv:Envelope>
```
like image 69
adrianbanks Avatar answered Oct 17 '22 10:10

adrianbanks