It's all about the answers!

Ask a question

How to Query Source Control for file.


Daniel Connell (124) | asked Aug 19 '14, 2:39 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR
edited Aug 27 '14, 11:49 a.m. by Ralph Earle (25739)
I have been trying to find a way to query Source control and then capture the location and contents of a file, in my project, so that I can use an XML Parser and extract its contents.

I need the following:

- How to connect to the correct Stream
- How to connect to the file in source control
- How to extract its contents as a string or Object so I can parse it.

Thanks !

Dan C.

One answer



permanent link
Kevin Eifinger (1211510) | answered Sep 02 '14, 5:24 a.m.
 Hi Daniel,
you can read the section "Reading" in my blog entry for that:

https://www.ibm.com/developerworks/community/blogs/7685ca43-63d4-4946-89fd-58d379a896d1/entry/how_to_read_and_write_a_file_in_the_repository_directly_without_having_to_create_a_workspace?lang=en

Finding the "correct" stream / querying a stream still has to be implemented by you. In my example the stream and component was known to me.

Your answer


Register or to post your answer.