login about faq

c_file = "d:/..."
o_atom = CreateObject('Chilkat.atom')
n_success = o_atom.LoadXml(c_file)
IF (n_success <> 1) THEN

*? o_atom.toXmlString()
o_entry = o_atom.getEntry(0)
? "gd:etag=",o_entry.getTopAttr("gd:etag") && ok
? "id1=",o_entry.getElement("id",0) && ok
? "id2=",o_entry.getElement("id",1) && ok, null
? "title1=",o_entry.getElement("title",0) && ok

? "gd:name=",o_entry.getElement("gd:name",0) && error -> null
? "gd:fullname=",o_entry.getElement("gd:fullName",0) && error -> null

? "gd:extendedProperty=",o_entry.getElementAttr("gd:extendedProperty",0,"name") && ok
? "gd:extendedProperty=",o_entry.getElementAttr("gd:extendedProperty",0,"value") && ok

? "getElementCount=",o_entry.getElementCount("link") && ok
? "getLinkHref=",o_entry.getLinkHref("self") && ok
? "getLinkHref=",o_entry.getLinkHref("http://schemas.google.com/contacts/2008/rel#photo") && ok

wait window " ok atom created"
release o_atom

asked Mar 24 '13 at 22:46

alpastar's gravatar image


edited Mar 24 '13 at 22:48

The problem has to do with the fact that "gd:name" has no actual content as defined by the Chilkat XML API. See http://www.chilkatsoft.com/refdoc/csXmlRef.html

The "gd:name" node has one child node -- namely "gd:fullName", and it in turn has the content "Fitzwilliam Darcy".

    <entry gd:etag="contactEtag">
        <app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T04:45:03.331Z</app:edited>
        <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact" />
        <title>Fitzwilliam Darcy</title>
            <gd:fullName>Fitzwilliam Darcy</gd:fullName>

If the "gd:name" node specified a type of "xml", then the getElement("gd:name") method call would return the full XML contained within it.

For example:

        <gd:name type="xml">
            <gd:fullName>Fitzwilliam Darcy</gd:fullName>

If the Chilkat Atom API does not provide a means to directly access the XML content, then you may instead use the Chlikat XML API directly for parsing the XML.


answered Mar 27 '13 at 15:36

chilkat's gravatar image

chilkat ♦♦

thank you !!

but atom is much better to use than xml 
chilkat-atom has  
addElementXml(), updateElementXml()
but there is no getElementXml()

is there any plan to upgrade atom-active-x ?

(Mar 28 '13 at 05:49) alpastar

What do you mean by "not working". We cannot read your mind...


answered Mar 25 '13 at 18:06

chilkat's gravatar image

chilkat ♦♦

<gd:name> <gd:fullname> Darcy </gd:fullname> </gd:name>

? o_entry.getElement("gd:Name",0)
i expect " <gd:fullname> Darcy </gd:fullname>"
but the result is empty(not null)
? o_entry.getElement("gd:fullName",0)
i expect "Darcy"
but the result is empty(not null)

when i change sample as
<gd:name> Darcy </gd:name>

then it is ok, returns Darcy


answered Mar 26 '13 at 00:41

alpastar's gravatar image


edited Mar 26 '13 at 09:22

Your first example appears to be malformed XML, so that could be causing the problem (you are missing a slash on the closing <gd:name> tag:

<gd:name> <gd:fullname> Darcy </gd:fullname> <gd:name>

Should be:

<gd:name> <gd:fullname> Darcy </gd:fullname> </gd:name>

(Mar 26 '13 at 09:00) jpbro ♦

sorry, it is just a mis-spelling.(i edited)

but i tested with a real data from google , again, it returns empty string.

(Mar 26 '13 at 09:25) alpastar

The samples you posted above have been badly mangled, making it difficult to use for testing/experimentation. Make sure you put your code and XML in <pre></pre> tags.

Also, can you confirm that you are using the latest version of the ChilkatXml library? The DLL date should be Dec. 2012.

(Mar 26 '13 at 12:48) jpbro ♦

Is there a feed URL that can be used for testing? Otherwise, the XML file is needed.

(Mar 26 '13 at 14:02) chilkat ♦♦

version : 9.4.0(dec 2012)

source-code and attached file emailed to support@chilkatsoft.com,

please check..

(Mar 26 '13 at 23:29) alpastar
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 24 '13 at 22:46

Seen: 5,834 times

Last updated: Mar 28 '13 at 05:50

powered by OSQA