Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: using @ as Text for a link Pin
OriginalGriff14-Feb-17 6:03
mveOriginalGriff14-Feb-17 6:03 
AnswerRe: using @ as Text for a link Pin
Richard MacCutchan14-Feb-17 6:31
mveRichard MacCutchan14-Feb-17 6:31 
AnswerRe: using @ as Text for a link Pin
Richard Deeming14-Feb-17 6:42
mveRichard Deeming14-Feb-17 6:42 
Questionhow to jump to the particular section in a tab from different tab Pin
Dhyanga13-Feb-17 7:01
Dhyanga13-Feb-17 7:01 
AnswerRe: how to jump to the particular section in a tab from different tab Pin
Richard Deeming13-Feb-17 7:59
mveRichard Deeming13-Feb-17 7:59 
QuestionRead xml file from folder and extract data to database Pin
Member 1299751812-Feb-17 21:47
Member 1299751812-Feb-17 21:47 
AnswerRe: Read xml file from folder and extract data to database Pin
Pete O'Hanlon12-Feb-17 22:02
mvePete O'Hanlon12-Feb-17 22:02 
GeneralRe: Read xml file from folder and extract data to database Pin
Member 1299751813-Feb-17 7:51
Member 1299751813-Feb-17 7:51 
import java.io.IOException;

import javax.xml.parsers.DocumentBuilder;  
import javax.xml.parsers.DocumentBuilderFactory; 
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;	


public class Dom
{

	
   public static void main (String[] args)
   
   {
   String badnumber = "MPP";
   int badnumberconverted; 
   
   try {
      badnumberconverted = Integer.parseInt(badnumber);
   }catch (NumberFormatException nfEx){
  // System.out.println("banumber*1000000");
         }
      
               DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
               DocumentBuilder builder = factory.newDocumentBuilder();
               Document doc = builder.parse("repeat.xml");
               NodeList sampleIDs = doc.getElementsByTagName("Elements");
       for(int i=0;i<sampleIDs.getLength();i++){
               Node p = sampleIDs.item(i);
            if(p.getNodeType() == Node.ELEMENT_NODE){
               Element Elements = (Element) p;
               String id = Elements.getAttribute("id");
               NodeList nameList = Elements.getChildNodes();
             for(int j=0;j<nameList.getLength();j++){
               Node n = nameList.item(j);
             if(n.getNodeType() == Node.ELEMENT_NODE){
                Element name = (Element) n;
                  // System.out.println( convert(name.getTextContent()));
                System.out.println("Elements" + id + ":" + name.getTagName()+ "=" + name.getTextContent());
                  
                  }
               }
            }
         }     
      }  
               catch (ParserConfigurationException e){
      
                  e.printStackTrace();
      }
               catch (SAXException e)
      {
                  e.printStackTrace();
      }
                catch (IOException e){
         
                  e.printStackTrace();
      }
   }
   
  public static String convert(String val) 
   
   {
   
   double d = Double.parseDouble(val);
   d = d/1000000;
   
   return Double.toString(d);
   
                          
                      
        }    
   
   }

GeneralRe: Read xml file from folder and extract data to database Pin
Member 1299751813-Feb-17 7:52
Member 1299751813-Feb-17 7:52 
GeneralRe: Read xml file from folder and extract data to database Pin
Pete O'Hanlon13-Feb-17 8:12
mvePete O'Hanlon13-Feb-17 8:12 
AnswerRe: Read xml file from folder and extract data to database Pin
Garth J Lancaster12-Feb-17 22:32
professionalGarth J Lancaster12-Feb-17 22:32 
QuestionQuery group before and has numbered in access 2003 ? Pin
Member 245846712-Feb-17 20:57
Member 245846712-Feb-17 20:57 
AnswerRe: Query group before and has numbered in access 2003 ? Pin
Pete O'Hanlon12-Feb-17 22:01
mvePete O'Hanlon12-Feb-17 22:01 
QuestionHow to convert pdf to word(2003, 2007 and 2010)? Pin
Member 1275769511-Feb-17 3:46
Member 1275769511-Feb-17 3:46 
AnswerRe: How to convert pdf to word(2003, 2007 and 2010)? Pin
OriginalGriff11-Feb-17 4:19
mveOriginalGriff11-Feb-17 4:19 
AnswerRe: How to convert pdf to word(2003, 2007 and 2010)? Pin
Dave Kreskowiak11-Feb-17 4:56
mveDave Kreskowiak11-Feb-17 4:56 
AnswerRe: How to convert pdf to word(2003, 2007 and 2010)? Pin
Patrice T12-Feb-17 10:32
mvePatrice T12-Feb-17 10:32 
QuestionReturn List From Joined Tables Using LINQ Pin
Liagapi10-Feb-17 19:14
Liagapi10-Feb-17 19:14 
AnswerRe: Return List From Joined Tables Using LINQ Pin
Garth J Lancaster10-Feb-17 20:35
professionalGarth J Lancaster10-Feb-17 20:35 
GeneralRe: Return List From Joined Tables Using LINQ Pin
Liagapi10-Feb-17 23:11
Liagapi10-Feb-17 23:11 
GeneralRe: Return List From Joined Tables Using LINQ Pin
Garth J Lancaster11-Feb-17 1:39
professionalGarth J Lancaster11-Feb-17 1:39 
AnswerRe: Return List From Joined Tables Using LINQ Pin
Eddy Vluggen11-Feb-17 2:11
professionalEddy Vluggen11-Feb-17 2:11 
SuggestionRe: Return List From Joined Tables Using LINQ Pin
Richard Deeming12-Feb-17 1:38
mveRichard Deeming12-Feb-17 1:38 
GeneralRe: Return List From Joined Tables Using LINQ Pin
Liagapi12-Feb-17 6:11
Liagapi12-Feb-17 6:11 
QuestionVirtual Trackpad > WIndows... Pin
qzzf1w10-Feb-17 9:12
qzzf1w10-Feb-17 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.