Question: I am looking to retrieve the value of Body element from XML. Though I've done the code right due to some reason I am getting NULL pointer exception.Any help is appreciated.

```
 package com.company;      
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import java.io.File;
 import java.io.IOException;
 import java.io.StringBufferInputStream;
 import java.io.StringReader;

 public class Main {

 public static void main(String[] args)  {

   String xmlDoc = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Body>This is my content</Body>";

  try {
    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
    Document document = documentBuilder.parse(new InputSource(new StringReader(xmlDoc)));

    XPath xPath = XPathFactory.newInstance().newXPath();
    XPathExpression expression = xPath.compile("/Body");
    Node node = (Node) expression.evaluate(document, XPathConstants.NODE);
    System.out.println("Body: " + node.getAttributes().getNamedItem("Body").getNodeValue());           
       } 

  catch (ParserConfigurationException | SAXException | IOException | DOMException | XPathExpressionException exp) 
  {
      exp.printStackTrace();
     }
   }
 }

```

Answer: 
To reduce the complexity of subclassing, you can take UIView and UIlabel, set frame of UIView to screen width and take UILabel frame as screenwidth - 8 (or whatever pixels is appropriate for you). Manage the frames and add both to mainview, this way you will be able to achieve the look.
Try this

```
titleLabel.text = @"abcd exadgdf    \u{200c}""

```

You can also do one more thing. You can use attributed string and set attributed text to titlelabel without formatting string like this 

```
NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@"ABCD      "];

titleLabel.attributedText = attrString;

```