Package com.dbxml.xml

Examples of com.dbxml.xml.QName


         attrs.addAttribute(uri, qname.getLocalName(), qname.getName(), "", value);
   }

   public void procInst(DocumentTableEntry entry) throws Exception {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      entry = processor.next();
      int valID = entry.getValID();
      String data = table.getValue(valID).toString();
      processor.next(); // Eat the OBJ_END_PROCINST
      content.processingInstruction(qname.getName(), data);
   }
View Full Code Here


            DocumentTableEntry entry = proc.next();
            byte typeID = entry.getTypeID();
            int valID = entry.getValID();
            if ( Constants.isPayloadSymbol(typeID) ) {
               if ( valID != -1 ) {
                  QName qname = symbols.getQName(valID);
                  builder.addEntry(typeID, qname);
               }
               else
                  builder.addEntry(typeID);
            }
View Full Code Here

      popContext();
   }

   public void beginElement(DocumentTableEntry entry) {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      String uri = qname.getURI();

      Element elem;
      if ( uri != null )
         elem = doc.createElementNS(uri, qname.getName());
      else
         elem = doc.createElement(qname.getName());

      if ( node == null )
         node = elem;
      if ( context != null )
         context.appendChild(elem);
View Full Code Here

      popContext();
   }

   public void attribute(DocumentTableEntry entry) {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      String uri = qname.getURI();
      StringBuffer sb = new StringBuffer();
      do {
         entry = processor.next();
         if ( entry.getTypeID() == Constants.OBJ_TEXT ) {
            int valID = entry.getValID();
            sb.append(UTF8.toCharArray(table.getValue(valID)));
         }
      }
      while ( entry.getTypeID() != Constants.OBJ_END_ATTRIBUTE );

      Element elem = (Element)context;
      if ( uri != null )
         elem.setAttributeNS(uri, qname.getName(), sb.toString());
      else
         elem.setAttribute(qname.getName(), sb.toString());
   }
View Full Code Here

         elem.setAttribute(qname.getName(), sb.toString());
   }

   public void procInst(DocumentTableEntry entry) {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      entry = processor.next();
      int valID = entry.getValID();
      String data = table.getValue(valID).toString();
      processor.next(); // Eat the OBJ_END_PROCINST
      ProcessingInstruction pi = doc.createProcessingInstruction(qname.getName(), data);
      if ( node == null )
         node = pi;
      if ( context != null )
         context.appendChild(pi);
   }
View Full Code Here

   }

   private void elementNode(Element elem) {
      String name = elem.getTagName();
      String uri = elem.getNamespaceURI();
      QName q = new QName(name, uri);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_ELEMENT, q);
      processNamedNodeMap(elem.getAttributes());
      processNodeList(elem.getChildNodes());
      builder.addEntry(Constants.OBJ_END_ELEMENT, symID);
   }
View Full Code Here

   }

   private void attributeNode(Attr attr) {
      String name = attr.getName();
      String uri = attr.getNamespaceURI();
      QName q = new QName(name, uri);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_ATTRIBUTE, q);
      processNodeList(attr.getChildNodes());
      builder.addEntry(Constants.OBJ_END_ATTRIBUTE, symID);
   }
View Full Code Here

   }

   private void procInstNode(ProcessingInstruction procInst) {
      String name = procInst.getTarget();
      String uri = procInst.getNamespaceURI();
      QName q = new QName(name, uri);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_PROCINST, q);
      String v = procInst.getData();
      byte[] b = UTF8.toUTF8(v);
      builder.addEntry(Constants.OBJ_TEXT, b);
      builder.addEntry(Constants.OBJ_END_PROCINST, symID);
View Full Code Here

   private void documentTypeNode(DocumentType docType) {
      /** @todo Still have to work this out */
   }

   private void notationNode(Notation notation) {
      QName qname = new QName(notation.getNodeName());
      int symID = builder.addEntry(Constants.OBJ_BEGIN_NOTATION, qname);
      String publicID = notation.getPublicId();
      byte[] b = UTF8.toUTF8(publicID);
      builder.addEntry(Constants.OBJ_TEXT, b);
      String systemID = notation.getSystemId();
View Full Code Here

      builder.addEntry(Constants.OBJ_TEXT, b);
      builder.addEntry(Constants.OBJ_END_NOTATION, symID);
   }

   private void entityNode(Entity entity) {
      QName qname = new QName(entity.getNodeName());
      int symID = builder.addEntry(Constants.OBJ_BEGIN_ENTITY, qname);
      String publicID = entity.getPublicId();
      byte[] b = UTF8.toUTF8(publicID);
      builder.addEntry(Constants.OBJ_TEXT, b);
      String systemID = entity.getSystemId();
View Full Code Here

TOP

Related Classes of com.dbxml.xml.QName

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.