WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Vizard and XML (https://forum.worldviz.com/showthread.php?t=1167)

xingtzu 07-31-2007 11:17 PM

Vizard and XML
 
Hello,

I have been attempting to get vizard to import data from an XML file using SAX2 interface. I have downloaded PyXML and have been racking my brain trying to get this to work with vizard. If someone could possibly help I would appreciate it. My goal for right now is to write a peace of code that would parse an XML document for a specific bit of info than assign it to a variable to be printed as a static image in vizard.

Ideally the program will parse multiple XML documents sequentially then add each of there information to an array which will then be able to be viewed. For example parsing a book which has an XML document for each page, then using the page number tags to put the number in the bottom left of the VR book and the body tags to write the text on the page. As I turn back and forth on the pages, the array increments or decrements than shows the information on that page as it did the previous.

I hope this explanation is sufficient and any help on Vizard and XML would be appreciated.

farshizzo 08-01-2007 12:43 PM

1 Attachment(s)
Hi,

I use the elementtree module for parsing XML files. It is super easy to use. You can find more info about it here:

http://effbot.org/zone/element-index.htm

I've attached a zip file which contains the module and a sample script showing how to use it. Hope this helps.

xingtzu 08-01-2007 05:31 PM

Thanks
 
Thanks this is exactly what I needed. I appreciate the help, wish I had asked sooner.


All times are GMT -7. The time now is 10:47 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC