473,320 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

JDOM Children Elements and Namespaces

Why is it that this works :

root.getChild("detail",NS).getChild("site-export").getChild("category-list").addContent((Content)c);
But this does not :

Element detail = root.getChild("detail",NS);
detail.getChild("category-list").addContent((Content)c);
// There are no namespace prefixes for elements below detail.

In other words it looks like to get children Elements
when using Namespaces I have to navigate all the way down
to the specific node instead of having JDOM find the nearest
node having the name.

Jul 20 '05 #1
0 1024

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mali_djuro | last post by:
Hi all, i used JDOM to create XML file. first, i get data from database and create Document object. in some data i have quotas, so it makes replacment in content of elements. for example: if i...
1
by: chiry | last post by:
Is there a way to make Element.addContent add the content at a specific location? I need to update an existing jdom object in memory, by adding/removing some elements. problem is, addContent()...
0
by: Marcio DeBarros | last post by:
Hi, This is my first time with XML, and I am using JDOM, on a Java client/server application, where the server will store data in XML files (not using any DBMS). I came across the following...
3
by: Bernd Oninger | last post by:
When I run the successfully compiled java source shown at the end I got a runtime error: Exception in thread "main" java.lang.NoClassDefFoundError: org/jdom/Content Where is the missing class ?...
2
by: john smith | last post by:
hello, I am having to read an XML document and grab some elements and attributes and then convert that to anther XML document. Which should I use? JAX, DOM, JDOM? I don't really understand...
0
by: kyancy | last post by:
Hello All. We have several XML schemas to describe common component document parts. We then create new XML schemas as necessary that use "xsd:import schemaLocation=whateverLocation.." to include...
6
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... ...
0
by: Walt Borders | last post by:
Hi, My problem: Merging two datasets deletes parent elements, preserves all children. I've created two dataSets. Each use the same schema, parent-child nested tables. The first dataSet is...
3
by: interista2 | last post by:
hello, i have written this code: mport org.jdom.*; import org.jdom.input.SAXBuilder; import java.io.*; import java.io.InputStream; import java.util.*;
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.