Simpe XML question. You can make yourself look smart!
I have the following xml file:
<?xml version="1.0"?>
<ToolConfig>
<database_info></database_info>
<spelling_info></spelling_info>
<server_info></server_info>
<concept_list></concept_list>
</ToolConfig>I have the following java program:
import java.io.*;
import org.w3c.dom.*;
import org.apache.xerces.parsers.DOMParser;
import org.xml.sax.SAXException;
public class ConfigParams
public ConfigParams()
String configFile = new String("C:\\tomcat\\webapps\\QueryTool\\WEB-INF\\ToolConfig.xml");
try
DOMParser parser = new DOMParser();
parser.parse(configFile);
org.w3c.dom.Document configDoc = parser.getDocument();
NodeList nodeList = configDoc.getChildNodes();
for (int j=0; j<nodeList.getLength(); j++)
System.err.println(j+": "+nodeList.item(j).getLocalName());
System.err.println("-----");
Node topNode = nodeList.item(0);
NodeList sectionNodes = topNode.getChildNodes();
for (int j=0; j<sectionNodes.getLength(); j++)
System.err.println(j+": "+sectionNodes.item(j).getLocalName());
System.err.println("-----");
catch (SAXException se)
System.err.println("SAX EXCEPTION");
se.printStackTrace();
catch (IOException ioe)
System.err.println("IO EXCEPTION");
ioe.printStackTrace();
public static void main(String[] args)
ConfigParams cp = new ConfigParams();
}The program outputs the following:
0: ToolConfig
0: null
1: database_info
2: null
3: spelling_info
4: null
5: server_info
6: null
7: concept_list
8: null
-----My question is: Why does it find nine child nodes when I only have four child nodes in the XML file? Why is every other child node null?
Thanks,
Jon
Thanks. That was helpful. I changed the getLocalName() call to getNodeName() and now it makes more sense. I do have another question, though: what is a local node name? What is a qualified node name?
Thanks,
Jon
P.S. Or maybe I should just go Read The Fine Manual.
Similar Messages
-
its not a question, but i just hope someone from apple can read this, i just wish you can make a card just like itunes card, for ipad wi-fi card. would be convenience.
That's why he gave you the link to make the suggestion.
But returning to your proposal ... Apple does not sell any of the "wifi" connections. It would be up to providers of service to sell giftcards, and perhaps Boingo or some of other airport-commercial WiFi firms do. I can't think of any other place I've been asked to pay for WiFi.
Now Verizon and AT&T, as well as other providers in other countries, could sell Gift Cards... and again, perhaps they do, but you'll have to check with them or make the suggestions there. It's really not an Apple issue, as they don't sell or provide any connections, just the hardware to make them. -
Hi there,
Not an urgent question, however I would like some help.
EA Games ran a great promotion over the holidays that offered free iphone/ipod and ipad games. I won a few but have not been able to access the games due a weird bug. Everytime I attempt to redeem the code on my iphone in the app store or via Itunes app a pop-up appears "before you can make purchases, you must tap Continue to sign in, then verify your payment info." I'd happily click the continue button if there was one. But there isn't. I click on for the pop-up to move on and I'm back at the screen that asks me to redeem. Which I do and the pop-up returns. I'm fully logged in my payment method works for other app purchases or updates but not these EA codes. Very odd.There are user-to-user public forums, you're not talking to iTunes Support - I've asked the hosts to remove your account id and password from your post, but you should change your password IMMEDIATELY.
If you are getting a message to contact iTunes Support then you can do so via this link and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption -
is there a way you can make a contact page with blank fields to put info. on iWeb and submit it to my email?
It depends on where you publish.
MobileMe users need to use a form service or MailShoot...
http://www.iwebformusicians.com/Website-Email-Marketing/Form-Service.html
http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
If you publish to another server that supports php you can do it yourself...
http://www.iwebformusicians.com/Website-Email-Marketing/Contact-Form.html
"I may receive some form of compensation, financial or otherwise, from my recommendation or link." -
I can´t rent movies on Apple TV I keep getting this message: Verification Required Before you can make purchases, you must go to the ITunes Store on your Computer and verify your payment information ? Done and still aren´t able to rent.
Hi.
You will need an iTunes acount !! then just log in to it and confirm your card payment details.
I've don the same think!! good luck! it works for me. -
?I'm trying to download a free app and I keep getting a message that says; "Payment Type paypal is not supported on this device blah blah go to the iTunes Store on your computer. You must verify your payment info before you can make purchases. I did all that, updated payment info and checked paypal it is verified, and it still won't work. Im stumped
If you still have problem, contact iTune Support
https://ssl.apple.com/emea/support/itunes/contact.html -
I forgot my security question you can not buy please help thank you
I forgot my security question you can not buy please help thank you
The Three Best Alternatives for Security Questions and Rescue Mail
1. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
2. Call Apple Support in your country: Customer Service: Contact Apple support.
3. Rescue email address and how to reset Apple ID security questions.
A substitute for using the security questions is to use 2-step verification:
Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID. -
hello! my problem at jump of paid games I can't remember answers to confidential questions. you can cancel or step by
step describe what to do? thanksThe Best Alternatives for Security Questions and Rescue Mail
a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
b. Call Apple Support in your country: Customer Service: Contacting Apple for
support and service.
c. Rescue email address and how to reset Apple ID security questions -
Hi I am Del
I am trying to rent a movie on my Apple tv keep getting the message - verification required before you can make purchases you must go to the itunes store on your computer and verify your payment information
ThanksHave you paired your Apple Tv with your iTunes account? That's how rentals and purchases are billed. If, however, you have already done that it is possible that there is a glitch in the system. I've had that happen occasionally and it usually goes away if I reset Apple Tv. On one occasion that I didn't work so I had to go to iTunes and deauthorize and then authorize this computer. Also, check to see if your Home Sharing is on (under File in iTunes). Hope that helps.
-
hi,each time i`m trying to update any program in my phone i got this messege(before you can make purchases you must tap continue to sign in,then u must verifty your payment information),and i wanna it for free,what i have to do please?
There are user-to-user public forums, you're not talking to iTunes Support - I've asked the hosts to remove your account id and password from your post, but you should change your password IMMEDIATELY.
If you are getting a message to contact iTunes Support then you can do so via this link and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption -
A prompt comes up on my TV screen when I try and purchase a movie "before you can make any purchases you must go to Itunes store on your computer and verify your account information". Have tried to do this to no avail - all my purchase and address details
it is a problem with the latest update. nothing you can do will fix it, besides rolling your apple tv back to the last update.
-
i have apple id but in this week i see this error : you must verify your payment info befor you can make purchases. please help me. i have not credit card but i buying apps with gift card. please help me
Why do you keep making multiple posts with this issue? You have now posted it three times in the last hour and have two different people helping you in two different threads!
https://discussions.apple.com/message/18606895
https://discussions.apple.com/message/18606685
This is bad internet manners. -
As the thread says.
"Contact iTunes support before you can make a in-game (in-app) purchased buy again.. Solutions? Don't have time to wait for iTunes support to fix this =pYou need to do as requested
-
TS1702 Why am I getting "verification required before you can make a purchase on a free app?
Why am I getting a "verification required before you can make a purchase" on a free app?
because its per terms and conditions of itunes. use a gift card if you dont have a credit card
Peace, Clyde -
i need an upgrade to iphoto, but it wasn't purchased . the message appear you must verify your payment information before you can make purchases . i have 17$ credit by gift card . i don't have credit card
Hi ...
You need to take into account any applicable taxes and or fees. iTUNES STORE - TERMS AND CONDITIONS
So if the total cost of the app exceeds 17$, you'll need to purchase and redeem another iTunes gift card.
Maybe you are looking for
-
Problems with remote app solution suggestion!
Hello, I have been trying to get the Remote app to work on my windows 8 PC, but to no result. I am using an iPhone 5S. I believe the problem is that my PC is a desktop connected to the internet via ethernet. This is a very common issue. I spent aroun
-
Re: [iPlanet-JATO] Re: Href click & tiled view display
Srinivas-- Remember, attachments don't come through on the forum. Please send them to the jatoteam@e... alias. Todd ----- Original Message ----- From: "Srinivas Chikkam" <srinivas.chikkam@w...> Sent: Thursday, July 19, 2001 5:26 AM Subject: [iPlanet-
-
How to get Case Sensitive Check Box at Search Page
Hi Everyone, I am trying to get case sensitive check box at the bottom of the search page, for that we have to set any propert or we ahve to do anything else. Please Help!!!! Thanks, Amit
-
10.1 T-Mo typing language selection problem z10.
Z10STL100-3/10.1.0.2025 Ever since I installed the new software on Monday, I've had a problem with the languages on the phone. I have everything set up in English, with secondary Spanish keyboard input. I don't have the auto-detect turned on because
-
Issues with default program.
I installed aSSD in my MacBookPro 13" and copied all of my files from my old hard drive to it and now all of my default programs are reseted. I can't open DMG files now it just asks me what program I want to open it with. same with PKG files. I tried