• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is this XML information and how to get it?

 
steve garrison
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm parsing an XML file with Java but there's something in the XML I can't figure out. Not sure if it's an "attribute" or data or an "element", etc. How would a person fetch the 16 digit id values that are listed - starts with "09"? This XML file is well-formed and valid and created by EMC Documentum system. Using DOM parser.

I can parse and display all other data except for the Attachment ones. I get a NULL value for Attachment, even though there is obviously data there. No errors are thrown. See code displayed below

XML file continued above...

<DropdownList1><![CDATA[value1]]></DropdownList1>
<DropdownList11><![CDATA[value1]]></DropdownList11>
<Attachment1 id_type="object_id"><![CDATA[0984598e800302d6]></Attachment1>
<Attachment1 id_type="object_id"><![CDATA[0984598e800302d9]]></Attachment1>
<Attachment1 id_type="object_id"><![CDATA[0984598e800302dc]]></Attachment1>
</CombinedForm2>


....snippet of Java class:
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't that Element child Node an instance of CDATASection?

seems to me that this test will always fail:


As an obvious XML question this should have been posted in the XML forum.

Bill
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, it's just CDATA. I don't really want to read all that DOM-bashing code but if you realize that this:
<Attachment1 id_type="object_id"><![CDATA[0984598e800302dc]]></Attachment1>

is exactly the same as this:
<Attachment1 id_type="object_id">0984598e800302dc</Attachment1>

you should be okay. As long as you understand the DOM, that is.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic