Lines Matching refs:node
460 * Serialize the specified node as described above in the description of
461 * <code>LSSerializer</code>. The result of serializing the node is
462 * returned as a string. Writing a Document or Entity node produces a
463 * serialized form that is well formed XML. Writing other node types
467 * @param wnode The node to be written.
473 * SERIALIZE_ERR: Unable to serialize the node. DOM applications should
529 "unable-to-serialize-node", null);
532 error.fType = "unable-to-serialize-node";
622 * the node from the stream or to terminate the serialization early.
631 * the node from the stream or to terminate the serialization early.
657 * Serialize the specified node as described above in the general
680 * @param node The node to serialize.
682 * @return Returns <code>true</code> if <code>node</code> was
683 * successfully serialized and <code>false</code> in case the node
686 public boolean write(Node node, LSOutput destination) throws LSException{
688 if (node == null)
694 Document fDocument =(node.getNodeType() == Node.DOCUMENT_NODE)
695 ? (Document) node
696 : node.getOwnerDocument();
747 prepareForSerialization(ser, node);
807 if (node.getNodeType() == Node.DOCUMENT_NODE)
808 ser.serialize((Document) node);
809 else if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE)
810 ser.serialize((DocumentFragment) node);
811 else if (node.getNodeType() == Node.ELEMENT_NODE)
812 ser.serialize((Element) node);
813 else if (node.getNodeType() == Node.TEXT_NODE ||
814 node.getNodeType() == Node.COMMENT_NODE ||
815 node.getNodeType() == Node.ENTITY_REFERENCE_NODE ||
816 node.getNodeType() == Node.CDATA_SECTION_NODE ||
817 node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE ) {
818 ser.serialize(node);
862 * Serialize the specified node as described above in the general
880 * @param node The node to serialize.
882 * @return Returns <code>true</code> if <code>node</code> was
883 * successfully serialized and <code>false</code> in case the node
886 public boolean writeToURI(Node node, String URI) throws LSException{
887 if (node == null){
896 Document fDocument =(node.getNodeType() == Node.DOCUMENT_NODE)
897 ? (Document) node
898 : node.getOwnerDocument();
947 prepareForSerialization(ser, node);
978 if (node.getNodeType() == Node.DOCUMENT_NODE)
979 ser.serialize((Document) node);
980 else if (node.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE)
981 ser.serialize((DocumentFragment) node);
982 else if (node.getNodeType() == Node.ELEMENT_NODE)
983 ser.serialize((Element) node);
984 else if (node.getNodeType() == Node.TEXT_NODE ||
985 node.getNodeType() == Node.COMMENT_NODE ||
986 node.getNodeType() == Node.ENTITY_REFERENCE_NODE ||
987 node.getNodeType() == Node.CDATA_SECTION_NODE ||
988 node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE ) {
989 ser.serialize(node);
1020 private void prepareForSerialization(XMLSerializer ser, Node node) {
1034 root = node;
1037 Document document =(node.getNodeType() == Node.DOCUMENT_NODE)
1038 ? (Document) node
1039 : node.getOwnerDocument();
1049 if (node.getFirstChild() != null) {
1050 while (node != null) {
1051 verify(node, verifyNames, false);
1053 next = node.getFirstChild();
1057 next = node.getNextSibling();
1059 node = node.getParentNode();
1060 if (root == node){
1064 next = node.getNextSibling();
1067 node = next;
1071 verify(node, verifyNames, false);
1077 private void verify (Node node, boolean verifyNames, boolean xml11Version){
1079 int type = node.getNodeType();
1080 fLocator.fRelatedNode = node;
1092 wellformed = CoreDocumentImpl.isValidQName(node.getPrefix() , node.getLocalName(), xml11Version) ;
1095 wellformed = CoreDocumentImpl.isXMLName(node.getNodeName() , xml11Version);
1102 "wf-invalid-character-in-node-name",
1103 new Object[]{"Element", node.getNodeName()});
1105 "wf-invalid-character-in-node-name");
1112 NamedNodeMap attributes = (node.hasAttributes()) ? node.getAttributes() : null;
1125 "wf-invalid-character-in-node-name",
1126 new Object[] { "Attr", node.getNodeName()});
1128 "wf-invalid-character-in-node-name");
1141 DOMNormalizer.isCommentWF(fErrorHandler, fError, fLocator, ((Comment)node).getData(), xml11Version);
1147 CoreDocumentImpl.isXMLName(node.getNodeName() , xml11Version);
1154 DOMNormalizer.isXMLCharWF(fErrorHandler, fError, fLocator, node.getNodeValue(), xml11Version);
1159 DOMNormalizer.isXMLCharWF(fErrorHandler, fError, fLocator, node.getNodeValue(), xml11Version);
1163 ProcessingInstruction pinode = (ProcessingInstruction)node ;
1176 "wf-invalid-character-in-node-name",
1177 new Object[] { "Element", node.getNodeName()});
1184 "wf-invalid-character-in-node-name");