• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is this XML information and how to get it?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Look ma! I'm selling my stuff!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic