Results 1 to 2 of 2

Thread: DOM - reading from std::istream?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2007
    Posts
    5

    DOM - reading from std::istream?

    Hi, my current application framework which I want to make Collada ready uses a self written filemanager which can read from zip files and directories, using std::istream.

    I couldn't find any way how to build a DAE out of a std::istream. Is there a certain reason for the DOM not providing such a way, or is this way somehow not possible due to the general organisation of the DOM?

    Is it possible to add such a support in some upcoming dom releases?

    yours
    g3k

    @mods: i realized this is in the wrong subforum. please move it to the implementation forum.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Unfortunately there's no direct support for istreams. Internally, the DOM uses libxml's xmlreader module to parse xml. They don't provide an interface for parsing from a C++ istream (not surprising since libxml is mostly pure C). I do notice they have an xmlReaderForIO function where you provide callbacks to do the stream input. Maybe that could be used to provide direct support for istreams.

    The DOM can parse an in-memory document though, so you could load the data from the istream into a buffer and pass that to the DOM. Here's some sample code for that: http://paste.lisp.org/display/47463

Similar Threads

  1. Reading in a .obj file
    By MXA92 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-11-2012, 06:29 AM
  2. Reading 3D Model
    By Ameya in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-22-2012, 11:33 PM
  3. Reading data from GPU with FBO
    By Maciek R. in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 03-16-2011, 03:28 PM
  4. reading and using PNG images
    By Neonic in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-13-2009, 11:20 AM
  5. *.x - files reading - please help!
    By TB-Rex in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 04-20-2001, 04:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean