Package org.cybergarage.xml

Examples of org.cybergarage.xml.Parser


   * @since 1.8.0
   */
  public boolean loadDescription(InputStream input)
      throws InvalidDescriptionException {
    try {
      Parser parser = UPnP.getXMLParser();
      rootNode = parser.parse(input);
      if (rootNode == null)
        throw new InvalidDescriptionException(
            Description.NOROOT_EXCEPTION);
      deviceNode = rootNode.getNode(Device.ELEM_NAME);
      if (deviceNode == null)
View Full Code Here


  }

  public boolean loadDescription(String descString)
      throws InvalidDescriptionException {
    try {
      Parser parser = UPnP.getXMLParser();
      rootNode = parser.parse(descString);
      if (rootNode == null)
        throw new InvalidDescriptionException(
            Description.NOROOT_EXCEPTION);
      deviceNode = rootNode.getNode(Device.ELEM_NAME);
      if (deviceNode == null)
View Full Code Here

  }

  public boolean loadDescription(File file)
      throws InvalidDescriptionException {
    try {
      Parser parser = UPnP.getXMLParser();
      rootNode = parser.parse(file);
      if (rootNode == null)
        throw new InvalidDescriptionException(
            Description.NOROOT_EXCEPTION, file);
      deviceNode = rootNode.getNode(Device.ELEM_NAME);
      if (deviceNode == null)
View Full Code Here

    }
   
    String location = ssdpPacket.getLocation();
    try
      URL locationUrl = new URL(location);
      Parser parser = UPnP.getXMLParser();
      Node rootNode = parser.parse(locationUrl);
      Device rootDev = getDevice(rootNode);
      if (rootDev == null)
        return;
      rootDev.setSSDPPacket(ssdpPacket);
      addDevice(rootNode);
View Full Code Here

    if (content.length <= 0)
      return soapRes;
   
    try {
      ByteArrayInputStream byteIn = new ByteArrayInputStream(content);
      Parser xmlParser = SOAP.getXMLParser();
      Node rootNode = xmlParser.parse(byteIn);
      soapRes.setEnvelopeNode(rootNode);
    }
    catch (Exception e) {
      Debug.warning(e);
    }
View Full Code Here

      return rootNode;
     
    try {
      byte content[] = getContent();
      ByteArrayInputStream contentIn = new ByteArrayInputStream(content);
      Parser parser = SOAP.getXMLParser();
      rootNode = parser.parse(contentIn);
    }
    catch (ParserException e) {
      Debug.warning(e);
    }
   
View Full Code Here

  ////////////////////////////////////////////////

  public boolean loadSCPD(String scpdStr) throws InvalidDescriptionException
  {
    try {
      Parser parser = UPnP.getXMLParser();
      Node scpdNode = parser.parse(scpdStr);
      if (scpdNode == null)
        return false;
      ServiceData data = getServiceData();
      data.setSCPDNode(scpdNode);
    }
View Full Code Here

    return true;
  }

  public boolean loadSCPD(File file) throws ParserException
  {
    Parser parser = UPnP.getXMLParser();
    Node scpdNode = parser.parse(file);
    if (scpdNode == null)
      return false;
   
    ServiceData data = getServiceData();
    data.setSCPDNode(scpdNode);
View Full Code Here

  /**
   * @since 1.8.0
   */
  public boolean loadSCPD(InputStream input) throws ParserException
  {
    Parser parser = UPnP.getXMLParser();
    Node scpdNode = parser.parse(input);
    if (scpdNode == null)
      return false;
   
    ServiceData data = getServiceData();
    data.setSCPDNode(scpdNode);
View Full Code Here

    }
 
 
  private Node getSCPDNode(URL scpdUrl) throws ParserException
  {
    Parser parser = UPnP.getXMLParser();
    return parser.parse(scpdUrl);
  }
View Full Code Here

TOP

Related Classes of org.cybergarage.xml.Parser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.