From: Paolo Farinelli (paolo++at++sgi.com)
Date: 01/30/2003 19:21:58
Hello Marc,
Thanks for sending this question to the list.
No, currently there is no function that will parse a string and create
a hierarchy of pfvXmlNodes (I assume this is what you mean).
However, yours is a good idea, so I may well implement it for a
future release.
In the meantime, as a workaround, you could do something like:
pfvXmlNode* pfvParseXmlString( char* str ) {
FILE* fp = fopen( "/usr/tmp/pfv.xml","w");
fprintf(fp,"%s",str);
fclose(fp);
return pfvXmlNode::parseFile("/usr/tmp/pfv.xml");
}
Also take a look at the various methods in class pfvXmlNode (such as
setName, setAttr, setValue, addChild and addLeaf) and the sample program
/usr/share/Performer/src/pguide/libpfv/viewer/sample13 for an example of
how to create pfvXmlNodes through sw calls using the current API.
ciao,
Paolo
Marc Mendez wrote:
> Is there a way to instantiate a pfvXmlNode describing for example the
> whole viz config from a character string ???
>
> If not, this useful feature might be interesting for pf3.1 8)
>
> pfThanks,
> Marc.
-- Paolo Farinelli paolo++at++sgi.com Member of Technical Staff, OpenGL Performer 1-650-933-1808 Silicon Graphics 1600 Amphitheatre Pkwy, Mountain View, CA 94043
This archive was generated by hypermail 2b29 : Thu Jan 30 2003 - 19:22:08 PST