[jdom-interest] How to get src:key attribute
netizen
netizen.mail at attbi.com
Thu Dec 19 16:08:26 PST 2002
Hello Mark,
Thursday, December 19, 2002, 2:37:04 PM, you wrote:
MH> If you do have an definition then add this.
MH> document.getRootElement().getAttributeValue("key",
MH> org.jdom.Namespace.getNamespace( "key", "uriDefinitioninNamespace"
MH> ));
MH> -----Original Message-----
MH> From: netizen [mailto:netizen.mail at attbi.com]
MH> Sent: Thursday, December 19, 2002 4:22 PM
MH> To: Mark Hortman
MH> Subject: Re[8]: [jdom-interest] How to get src:key attribute
MH> Hello Mark,
MH> Thursday, December 19, 2002, 2:32:40 PM, you wrote:
MH>> Well, I am not an XML expert, but I THINK??? that that is not legal to
MH> have
MH>> src:key="2" as an attribute without defining an xmlns first.
MH>> I may be wrong, and if you are sure that you do not have a definition
MH> post
MH>> the question
MH>> to jdom-interest how do I get the value of src:key from the following
MH> xml
MH>> document.
MH>> <?xml version="1.0" encoding="UTF-8"?>
MH>> <ServicesProperties type="smtp" name="generic" rulesOn="standard"
MH> run="once"
src:key="2">>>
MH>> </ServicesProperties>
MH>> If you do have an definition then add this.
MH>> getAttributeValue("key", org.jdom.Namespace.getNamespace( "key",
MH>> "uridefinitioninNamespace" ));
MH>> -----Original Message-----
MH>>> <?xml version="1.0" encoding="UTF-8"?>
MH>>> <ServicesProperties type="smtp" name="generic" rulesOn="standard"
MH>> run="once"
src:key="2">>>>
MH>> Pretty sure. Let me explain the process a bit in case I missed
MH>> somthing. The attribute is put there by xindice when i add the xml
MH>> file to the database. The id is set buy me or automatically when
MH>> putting it into the database, the number 2 is set by me. So when I
MH> query
MH>> the database and get
MH>> this xml source i do a system out to see the value and it shows
MH>> src:key="2" on the main node.
MH> What if it has a namespace how would i get it? I'll give it a try to
MH> see if i'm missing something.
MH> Thanks again
Thanks for the help. I guess it is a namespace and was able to get
it.
strBuff = docXML.getRootElement().getAttribute( "key",
docXML.getRootElement().getNamespace( "src" )).getValue();
Yeah. Thank you
I'm posting it to thew newsgroup so that it gets achived.
Reading src:key xindice attribute
--
Best regards,
netizen mailto:netizen.mail at attbi.com
More information about the jdom-interest
mailing list