dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #12888
Re: new xml file
On Fri, Apr 03, 2009 at 06:20:14PM -0400, Shawn Walker wrote:
> I have a slight problem.
>
> Ola had suggested the following for trying out the new XML file code:
> ---------------------------------------
> If you want to use/test the new xml-style, open a file the following way
> (C++)
>
> File f("somefile.xml", true);
> f << some_data; // or
> f >> some_data;
>
> In Python, do
>
> f = File("somefile.xml")
> f.set_new_xml_style()
> f >> etc...
>
> Ola
> ---------------------------------------
>
> But what I would like to do is:
>
> Mesh mesh("P2_Mesh_Ex.xml",true);
>
> In other words, I would like to try out the new XML code for meshes.
> However, this does not work. Will this be taken care of soon? If so,
> then it doesn't really matter. I tried to see what to modify but it
> wasn't very clear.
>
> - Shawn
You can do
Mesh mesh;
File file("P2_Mesh_Ex.xml", true);
file >> mesh;
It does the same thing.
--
Anders
Attachment:
signature.asc
Description: Digital signature
References