public void addContentChild(FXGNode child){
  if (child instanceof ParagraphNode || child instanceof BRNode || child instanceof SpanNode|| child instanceof CDATANode) {
    if (content == null) {
      content=new ArrayList<TextNode>();
      contiguous=true;
    }
    if (!contiguous) {
      throw new FXGException(child.getStartLine(),child.getStartColumn(),"InvalidTextGraphicContent");
    }
    content.add((TextNode)child);
  }
}

public void addContentChild ( FXGNode child ) { if ( child instanceof ParagraphNode || child instanceof BRNode || child instanceof SpanNode || child instanceof CDATANode ) { if ( content == null ) { content = new ArrayList < TextNode > ( ) ; contiguous = true ; } if ( ! contiguous ) { throw new FXGException ( child . getStartLine ( ) , child . getStartColumn ( ) , "InvalidTextGraphicContent" ) ; } content . add ( ( TextNode ) child ) ; } }
& lt ; textgraphic & gt ; content allows child & lt ; p & gt ; , & lt ; span & gt ; and & lt ; br / & gt ; tags , as well as character data ( text content ) .
