Leslieinva
Can one import XML data (of the correct format of course) into Personal Brain 4?  It clearly exports it, but how would you import it? 

I'd like to take data I have in a "Microsoft Access" database & import it into PB.  I have no problem exporting from Access to an XML format that looks like what PB exports, but I can't figure out how to get it into PB.
Quote
agnor
As far as I know, if you have properly-formatted XML copied to the clipboard, you can just do "edit" -> "Paste thoughts" and it should work.

If that doesn't work (or show up), try copying your XML to the clipboard and doing a straight "paste" in a TEST brain to see what happens.

Quote
Leslieinva
To test this out, I took the xml that was exported directly from Jane's Brain, a sample on the TheBrain site. This way I knew that I should have properly formated xml.

I copied the text for thought 2.xml, but when I went to my new PB, both the Edit > Paste & the Thought > Paste menu options were grayed out.  I know I had something on the clipboard because it would appear if I pasted into Notepad. 

It looks like the PB4.1.3.2 does not recognize the Windows clipboard.

Quote
agnor
Hmm, I see a few possible avenues from here:

1) Post the xml that you're trying to paste into an attachment here on the forum, so I can try it with the same exact XML code that you're using

2) try upgrading to 4.1.2.8 (the version I have) and see if that works any better for.

Also, which type of PB are you running?  Pro, Core, basic, Pro trial, Pro trial that expired into basic, etc?

Quote
agnor
Also, you aren't clicking "Export" => "XML For Brain EKP", are you?  Brain EKP is their enterprise version and I don't know if the XML schemas are the same.
Quote
Leslieinva
Here's an xml file straight from the PB Pro 4.1.3.2 export of Jane's Brain.  I used the site brain html with xml data export option.  Didn't use the xml for EXP.  Can you copy/paste this into your PB?

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <TheBrainSimpleXML>
  <Tht id="2" name="Jane's Brain" icon="" color="" hint="" modificationDate="Nov 25, 2007 11:58 AM" authorName="Leslie" authorEmail="lcstuff@nc.rr.com" />
  <Tht id="143" name="Key Resources" icon="" color="" hint="" />
  <Tht id="142" name="My Latest Preoccupations" icon="" color="" hint="" />
  <Tht id="3" name="My Web Services Business" icon="" color="" hint="" />
  <Tht id="4" name="Personal" icon="" color="" hint="" />
  <Link idA="2" idB="143" type="CHILD" />
  <Link idA="2" idB="142" type="CHILD" />
  <Link idA="2" idB="3" type="CHILD" />
  <Link idA="2" idB="4" type="CHILD" />
  <Content href="thoughtData/2.html" />
  </TheBrainSimpleXML>


Quote
agnor
Ahh, the "site brain w/ xml" option isn't going to give you the xml that you need.  You'll see the XML that you need if you select "Copy thought".

Attached is the xml for one thought from my brain.  This is the format it'll need to be in.

Quote
simonh

So you need to generate GUIDs for each item.  And don't forget the DOCTYPE line - that's what the Brain uses to recognize it has relevant data on the clipboard!

Quote
Leslieinva
Thanks Agnor & Simonh!  That xml did work.
Quote
agnor
Great, glad it worked.

Out of curiosity, how did you go about exporting from access?
Quote
Leslieinva
Haven't done the export from Access yet as I needed to know the exact format of the xml.  I'll name my fields to match the xml names & create a report that includes the starting & ending tags & inserts the field names & other characters needed around the values in the table.  Then I'll preview the report & copy the the text.
Quote
zenrain
To help you out a little more, in the attached format, tags within <Source></Source> are not required. Also, if you don't need to insert thoughts related to each other, or provide hard guids to reference in another portion of the paste, you may use an existing guid with a ! in front of it. This will cause the Brain to automatically assign one.
Windows 7
J-1.6.0_22
--
OSX 10.6.3
Java SE 6
Quote
Leslieinva
zenrain,

I didn't see <source> tags anywhere, was there an attachment that got lost?

Could I used any guid value & just precede it with a ! & have PB accept it?  Does the guid have to be a certain lenght?

Quote
zenrain
Sorry, I was referring to the text file example in agnor's post. Lines 4-9 deal with the source the thought was copied from. They are the data in between <Source> and </Source>.

Guids are formatted as shown by this example:  F53EA68D-0FAF-AE76-D970-9C02B78315A4

To have PB assign one, just use !F53EA68D-0FAF-AE76-D970-9C02B78315A4 instead. You can input an exisiting Guid (such as the example above) and it will automatically assign it's own when you paste the thought.

Windows 7
J-1.6.0_22
--
OSX 10.6.3
Java SE 6
Quote
Leslieinva
I'm still having two problems with the xml import.  I tried to import this text based on xml agnor sent us.  (This is what I was able to generate with a Microsoft Access report.)  Copying this as plain text into PB4 does not import anything.  Why is that?  Are there some required fields that must have data?

The second problem is that if PB makes its own guid, how can create xml for the links if I don't know what the guid will be until after it's imported.

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE BrainData SYSTEM "http://www.thebrain.com/dtd/BrainData1.dtd">
<BrainData>
   <Thoughts
    <Thought>
    <guid>!</guid>
    <name>Ubuntu Restricted wireless drivers</name>
    <label>Ubuntu Forums</label>
    <keywords/>
    <creationDateTime/>
    <realModificationDateTime/>
    <displayModificationDateTime/>
    <isType/>
    <color/>
    <accessControlType>0</accessControlType>
    </Thought>
   </Thoughts
</BrainData>

Quote

Newsletter Signup  Newsletter Signup        Visit TheBrain Blog   Visit TheBrain Blog       Follow us on Twitter   Follow Us       Like Us on Facebook   Like Us         Circle Us on Google+  Circle Us         Watch Us on Youtube  Watch Us       

TheBrain Mind Map & Mindmapping Software     Download TheBrain Mind Mapping Software