OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

OpenDocument XML and C#

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
kumarvidhani
General User
General User


Joined: 06 Nov 2008
Posts: 8

PostPosted: Mon Nov 24, 2008 3:19 am    Post subject: OpenDocument XML and C# Reply with quote

Hi,

I am trying to generate OpenOffice Document in C#. Here is my code:

TextDocument txtDoc = new TextDocument();
txtDoc.New();
txtDoc.Load("Preview_Test.odt");
XmlDocument xmlDocument = txtDoc.XmlDoc
XmlNodeList documentChildren = xmlDocument.GetElementsByTagName("text:p");

even though there exists elements with text:p tag it is returning null.

while for
XmlNodeList documentChildren = xmlDocument.GetElementsByTagName("office:body");
or
XmlNodeList documentChildren = xmlDocument.GetElementsByTagName("office:text");
it is not returning null.

I do not why I am not able to get reference of paragraph tags of document.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group