Package nu.xom

Examples of nu.xom.Builder.build()


        Document testDoc = builder.build(base + "xml/test/tests.xml");
        Elements documents = testDoc.getRootElement().getChildElements("document");
        for (int i = 0; i < documents.size(); i++) {
            Element documentElement = documents.get(i);
            String url = documentElement.getAttributeValue("url");
            Document source = builder.build(
              "http://svn.jaxen.codehaus.org/browse/~raw,r=trunk/jaxen/trunk/jaxen/"
              + url);
            Elements contextElements = documentElement.getChildElements("context");
            for (int j = 0; j < contextElements.size(); j++) {
                Element contextElement = contextElements.get(j);
View Full Code Here


            }
        }
        // we have no other option than to transform
        ByteArrayInputStream bis = convertToByteArrayInputStream(requestPayload);
        Builder builder = new Builder();
        Document document = builder.build(bis);
        return document.getRootElement();
    }

    @Override
    protected boolean supportsResponsePayloadReturnType(MethodParameter returnType) {
View Full Code Here

        public void saxSource(XMLReader reader, InputSource inputSource) throws IOException, SAXException {
            try {
                Builder builder = new Builder(reader);
                Document document;
                if (inputSource.getByteStream() != null) {
                    document = builder.build(inputSource.getByteStream());
                }
                else if (inputSource.getCharacterStream() != null) {
                    document = builder.build(inputSource.getCharacterStream());
                }
                else {
View Full Code Here

                Document document;
                if (inputSource.getByteStream() != null) {
                    document = builder.build(inputSource.getByteStream());
                }
                else if (inputSource.getCharacterStream() != null) {
                    document = builder.build(inputSource.getCharacterStream());
                }
                else {
                    throw new IllegalArgumentException(
                            "InputSource in SAXSource contains neither byte stream nor character stream");
                }
View Full Code Here

        @Override
        public void streamSource(InputStream inputStream) throws IOException {
            try {
                Builder builder = new Builder();
                Document document = builder.build(inputStream);
                element = document.getRootElement();
            }
            catch (ParsingException ex) {
                throw new XomParsingException(ex);
            }
View Full Code Here

        @Override
        public void streamSource(Reader reader) throws IOException {
            try {
                Builder builder = new Builder();
                Document document = builder.build(reader);
                element = document.getRootElement();
            }
            catch (ParsingException ex) {
                throw new XomParsingException(ex);
            }
View Full Code Here

        @Override
        public void source(String systemId) throws Exception {
            try {
                Builder builder = new Builder();
                Document document = builder.build(systemId);
                element = document.getRootElement();
            }
            catch (ParsingException ex) {
                throw new XomParsingException(ex);
            }
View Full Code Here

      if (builder == null)
        LOGGER.debug("UITools: XOM builder is null.");

      LOGGER.debug("UITools: about to build XML from input.");

      doc = builder.build(input);

      if (doc == null)
        LOGGER.debug("UITools: doc XOM obj is null.");

      load(doc);
View Full Code Here

    Builder builder = new Builder();

    Document doc = null;

    try {
      doc = builder.build(inputStream);
      load(doc);
    } catch (ValidityException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (ParsingException e) {
View Full Code Here

        {
            Builder builder = new Builder(false);

            File input = new File(path);

            Document doc = builder.build(input);

            return buildMapFromDocument(doc);
        }
        catch (Exception ex)
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.