How to use this function in VSL??????????

(3 posts) (2 voices)
  • Started 3 years ago by sunder3dvia
  • Latest reply from sunder3dvia
  1. sunder3dvia

    veteran
    Joined: Aug '14
    Posts: 278

    Hi,

    In Virtools Scripting Language when I use "atom.setData()" function, I get execution error.

    Could anyone help me how to over come from the problem..... If its possible you can provide me a sample where XML functions are used....

    Note:
    My doubts on using XML Functions in VSL......Not on BB of XML.

    Posted 3 years ago #
  2. CodeMasterMike

    veteran
    Joined: Feb '08
    Posts: 314

    Can you give little more information about what you are trying to achieve? What kind of object is "atom"?

    Posted 3 years ago #
  3. sunder3dvia

    veteran
    Joined: Aug '14
    Posts: 278

    Hi,

    Thanks a lot for your reply..... Here I send you the code what I am trying to do.

    void main()
    {
    XMLParserManager pm=XMLParserManager.Cast(bc.GetManagerByGuid(GetXMLParserManagerGUID()));

    XMLAtom parent=pm.CreateXMLAtom("Design");
    XMLAtom child=pm.CreateXMLAtom("shape");

    parent.AddChild(child);
    child.SetData("Oval");

    parent.Save("sample.xml");

    }

    I get execution error ,Where I have highlighted as bold.

    I expect this output in the xml file.

    <?xml version="1.0" encoding="UTF-8"?>

    <Design>
    <shape>Oval<shape/>
    </Design>

    Posted 3 years ago #

Reply

You must log in to post.