<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div>No, your function should be like:<br>
      <br>
      test7(UId,DId) when is_integer(Uid), is_integer(Did) -><span
        style="white-space:pre-wrap"></span></div>
    <div>   RootElem = {configuration,</div>
    <div>                    [{uid, [integer_to_list(UId)]},{dif,
      [integer_to_list(DId)]}]},</div>
    <div><span style="white-space:pre-wrap"> </span></div>
    <div><span style="white-space:pre-wrap">  </span>serialize([RootElem]).<span
        style="white-space:pre-wrap"> </span></div>
    <br>
    <br>
    <div class="moz-cite-prefix">On 02/10/2015 01:53 PM, Lamchith M C
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAJwTqyCD4=_oPH5E3F9-j4sRrOhx2FB0Cq0og2rRVjgVAqJ2Mg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div style="font-size:12.8000001907349px">Thanks, got it, where
          i am calling the function i will call with parameters
          surrounded by " ". I was trying that inside the function,
          which was failing like below</div>
        <div style="font-size:12.8000001907349px"><br>
        </div>
        <div style="font-size:12.8000001907349px"><br>
        </div>
        <div style="font-size:12.8000001907349px">
          <div style="font-size:12.8000001907349px">RootElem =
            {configuration,</div>
          <div style="font-size:12.8000001907349px">                   
            [{uid, ["UId"]},{dif, ["DId"]}]},</div>
          <div style="font-size:12.8000001907349px"><span
              style="white-space:pre-wrap"> </span></div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Feb 10, 2015 at 4:10 PM, Dmitry
          Klionsky <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:dm.klionsky@gmail.com" target="_blank">dm.klionsky@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Not sure what you
              mean, but I'm trying to say that Uid and Did should be
              atoms or strings.
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <div>On 02/10/2015 01:34 PM, Lamchith M C wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">So i can not make  this parametric?
                      So that by calling the <span
                        style="font-size:12.8000001907349px">test7(UId,DId)

                        functions with different variables to create
                        different xml.</span></div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Feb 10, 2015 at
                        3:20 PM, Dmitry Klionsky <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:dm.klionsky@gmail.com"
                            target="_blank">dm.klionsky@gmail.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            test7('1', "1") works because the simplest
                            Content's element should be <span>IOString.
                              <br>
                              <a moz-do-not-send="true"
                                href="http://www.erlang.org/doc/man/xmerl.html#export_simple-3"
                                target="_blank">http://www.erlang.org/doc/man/xmerl.html#export_simple-3</a><br>
                            </span>
                            <div>
                              <div><br>
                                <br>
                                <div>On 02/10/2015 11:46 AM, Lamchith M
                                  C wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">
                                    <div>
                                      <div>I want to create Following
                                        xml .</div>
                                      <div><br>
                                      </div>
                                      <div>
                                        <div><?xml version="1.0"?></div>
                                        <div><configuration></div>
                                        <div><uid>1</uid></div>
                                        <div>dif>1</dif></div>
                                        <div></configuration></div>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div>I am trying it with following
                                        code, but getting error.</div>
                                      <div><br>
                                      </div>
                                      <div>serialize(Data) -></div>
                                      <div>    Xml =
                                        lists:flatten(xmerl:export_simple(Data,
                                        xmerl_xml)),</div>
                                      <div>    io:format("~s~n", [Xml]).</div>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>test7(UId,DId) -><span
                                        style="white-space:pre-wrap"> </span></div>
                                    <div><span
                                        style="white-space:pre-wrap"> </span></div>
                                    <div>   RootElem = {configuration,</div>
                                    <div>                    [{uid,
                                      [UId]},{dif, [DId]}]},</div>
                                    <div><span
                                        style="white-space:pre-wrap"> </span></div>
                                    <div><span
                                        style="white-space:pre-wrap">  </span>serialize([RootElem]).<span
                                        style="white-space:pre-wrap"> </span></div>
                                    <div><span
                                        style="white-space:pre-wrap"><br>
                                      </span></div>
                                    <div><span
                                        style="white-space:pre-wrap">by
                                        calling test7(1,1) </span></div>
                                    <div><span
                                        style="white-space:pre-wrap"><br>
                                      </span></div>
                                    <div><span
                                        style="white-space:pre-wrap">Please

                                        help.</span></div>
                                    <div><br>
                                    </div>
                                    -- <br>
                                    <div>
                                      <div>Regards,</div>
                                      <div>Lamchith</div>
                                    </div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <span>
                                <pre>_______________________________________________
erlang-questions mailing list
<a moz-do-not-send="true" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a moz-do-not-send="true" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
                              </span></blockquote>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      <div>
                        <div>Regards,</div>
                        <div>Lamchith</div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">
          <div>Regards,</div>
          <div>Lamchith</div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>