White spaces in XML element

Hi...
  I need to put in an XML element the string value "      ", that is six white spaces, but when the XML parser interpets the document this value is transform like a null value.
  Is there some way to preserve this value in the element?

Thanks for you replay Reddi,
  Let me explain the scenario: The scenario is RFC --> XI  --> JDBC, one of the element of the FM sometimes could be have the value "      ", when this occurrs in the SXMB_MONI TC I see the value null in the element, that is the tag is <Element />, in this case I need to preserve this white space in the element. The message could be something like this:
<root>
  <element1>value 1</element1>
  <element2>value 2</element2>
  <element3>      </element3>
</root> 
but I see the message in this form:
<root>
  <element1>value 1</element1>
  <element2>value 2</element2>
  <element3 />
</root>
In the message mapping tool I assign the string value "      " and the problem still the same.
  Any Idea?

Similar Messages

  • DOM xml white space in xml element

    Hi there
    Can anyone please help me out with a issue I'm having with altering an xml, and then storing it.
    The thing is, that when I delete all elements under a parent to insert something new there's a big gap when looking at the xml. Like this
    orginal xml fil(as an example):
    <batch>
    <somethingtag> <- Im removing these
    </somethingtag>
    <somethingtag> <- Im removing these
    </somethingtag>
    <somethingtag> <- Im removing these
    </somethingtag>
    <somethingtag> <- Im removing these
    </somethingtag>
    <somethingtag> <- Im removing these
    </somethingtag>
    </batch>
    with code:
              for(int i = 0; i < antallStartTagger ;i++)
                   //System.out.println("Slettet invoicetag nr: " + i);
                   Element startTag = (Element) nodeEn.item(0);                              // Forrige er slettet, s� neste f�rste hele tiden
                   startTag.getParentNode().removeChild(startTag);               
    don't bother the name. The result is:
    <batch>
    <- still space
    </batch>
    and when I insert a new element, it put itself at the far bottom, like this:
    <batch>
    <newtag>
    </newtag>
    <newtag>
    </newtag>
    </batch>
    And for saving the file STILL with gaps I use the Transformer class:
    File xmlOutputFile = new File(filename......);
         FileOutputStream fos = null;
         Transformer transformer = null;
                   fos = new FileOutputStream(xmlOutputFile);
                   // Use a Transformer for output
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
         transformer = transformerFactory.newTransformer();
              DOMSource source = new DOMSource(documentSkjellett);
              StreamResult result = new StreamResult(fos);
              // transform source into result will do save
         transformer.transform(source, result);
         ediLog.append(" -> [" + ediFil + "] lagret");
              catch (FileNotFoundException e)
              {System.out.println("##FEIL## : FileNotFoundException i lagreXMLFil: " + e.getMessage() + " " + e);}
              catch (TransformerConfigurationException e)
              {System.out.println("##FEIL## : TransformerConfigurationException i lagreXMLFil: " + e.getMessage() + " " + e);}
              catch (TransformerException e)
              {System.out.println("##FEIL## : TransformerException i lagreXMLFil: " + e.getMessage() + " " + e);}
    Can anyone advice?
    Paul

    It's because <batch> has two types of children: elements and text nodes.
    Assuming that the text is just whitespace, and you don't care about any text occurring between nodes, first call document.normalize() to aggregate all that text into one big node, then seek out and destroy it.
    Alternately, if you know that there shouldn't be any text directly under <batch>, simply iterate through its child nodes and remove any that are instanceof Text.

  • Report Painter Report - Leading White Spaces in Cost Element

    When calling up a report painter report, e.g. S_ALR_87013613, with cost element characteristic in Office integration/Microsoft Excel as output parameters, the cost element (row item) is indented with white spaces.  The number of white spaces seems to be in relation with summation levels (sub-totals) visible in the left panel.  For some cost centres that only have limited transactions, such as no posting to salary account group, there are less levels of summation, meaning less leading white space in cost elements.  Is there any way to eliminate or have a fixed number of leading white spaces in cost elements? 
    We export the report to Excel worksheet for further processing.  VLOOKUP function is used to read the cost element into another workbook.  The inconsistent number of leading white spaces creates a problem for the formulas to work properly. 
    Any suggestion is appreciated.
    Regards,

    Hello,
    There are different ways of downloading the report to excel. One option is
    System ==> List ==> save (to local file)
    Please try with other options.
    If still not working, then the work around would be
    You can put ctrl+H (replace all spaces)
    Then text to columns
    Hope this works.
    Regards,
    Ravi

  • How to remove white spaces from XML content using Coldfusion?

    Hi,
    Can anybody help me in removing white spaces in between the tags from the below XML content using coldfusion?
    XML content:
    <?xml version="1.0" encoding="UTF-8"?> <chart showdates="true" today="08/12/2009"> <phases> <phase color="CCFFCC" name="Funded"/> <phase color="CDCD67" name="Concept"/> <phase color="99CCFF" name="Feasibility"/> <phase color="0099FF" name="Development"/> <phase color="0099FF" name="Development"/> <phase color="CC99FF" name="Close-out"/> <phase color="909090" name="Sustaining"/> </phases><program name=""> <project enddate=" 30/03/2007 " id="43250" startdate=" 28/02/2006 "> <version enddate=" 30/03/2007 " number=" 1" startdate=" 28/02/2006 "> <phase color="CCFFCC" currentdate="23/03/2006" name="Project Start" plandate="28/02/2006" type="phase"/> <phase color="99CCFF" currentdate="04/04/2006" name="Feasibility Closure" plandate="31/05/2006" type="phase"/> <phase color="0099FF" currentdate="29/03/2007" name="Commercialization" plandate="30/12/2006" type="phase"/> <phase color="CC99FF" currentdate="30/03/2007" name="Project Closed" plandate="30/03/2007" type="phase"/> <phase color="909090" currentdate="" name="Obsolescence" plandate="" type="phase"/> </version> </project> </program> </chart>
    Output I am expecting is like below,
    <?xml version="1.0" encoding="UTF-8"?><chart showdates="true" today="08/12/2009"><phases><phase color="CCFFCC" name="Funded"/><phase color="CDCD67" name="Concept"/><phase color="99CCFF" name="Feasibility"/><phase color="0099FF" name="Development"/><phase color="0099FF" name="Development"/><phase color="CC99FF" name="Close-out"/><phase color="909090" name="Sustaining"/></phases><program name=""><project enddate=" 30/03/2007 " id="43250" startdate=" 28/02/2006 "><version enddate=" 30/03/2007 " number=" 1" startdate=" 28/02/2006 "><phase color="CCFFCC" currentdate="23/03/2006" name="Project Start" plandate="28/02/2006" type="phase"/><phase color="99CCFF" currentdate="04/04/2006" name="Feasibility Closure" plandate="31/05/2006" type="phase"/><phase color="0099FF" currentdate="29/03/2007" name="Commercialization" plandate="30/12/2006" type="phase"/><phase color="CC99FF" currentdate="30/03/2007" name="Project Closed" plandate="30/03/2007" type="phase"/><phase color="909090" currentdate="" name="Obsolescence" plandate="" type="phase"/></version> </project></program></chart>
    Thanks in advance,
    Regards,
    Manoz.

    Daverms,
    Thanks for the quick turn around..
    I have applied the solution what you suggested above (<cfprocessingdrirective suppresswhitespaces="yes"), still whitespaces are existing in my output.
    The output what I am getting is,
    (blue color part is my output & red color indicates whitespaces)
    <?xml version="1.0" encoding="UTF-8"?>
    <chart showdates="true" today="09/12/2009">
    <phases>
    <phase color="CCFFCC" name="Funded"/>
    <phase color="CDCD67" name="Concept"/>
    <phase color="99CCFF" name="Feasibility"/>
    <phase color="0099FF" name="Development"/>
    <phase color="0099FF" name="Development"/>
    <phase color="CC99FF" name="Close-out"/>
    <phase color="909090" name="Sustaining"/>
    </phases>
    <program name="">
    <project enddate=" 01/01/2010 " id="12059" startdate=" 20/06/2003 ">
    <version enddate=" 01/01/2010 " number=" 1" startdate=" 20/06/2003 ">
            <phase color="CCFFCC" currentdate="20/06/2003" name="Project Start" plandate="20/06/2003" type="phase"/>
            <phase color="CDCD67" currentdate="" name="Concept Closure" plandate="" type="phase"/>
            <phase color="99CCFF" currentdate="20/06/2003" name="Feasibility Closure" plandate="20/06/2003" type="phase"/>
            <phase color="F0FF00" currentdate="" name="Alpha Test" plandate="" type="milestone"/>
            <phase color="F0FF00" currentdate="26/07/2004" name="Beta Test" plandate="31/05/2004" type="milestone"/>
            <phase color="0099FF" currentdate="29/06/2005" name="Commercialization" plandate="08/12/2004" type="phase"/>
            <phase color="CC99FF" currentdate="24/02/2006" name="Project Closed" plandate="01/01/2010" type="phase"/>
            </version>
    <subproject enddate=" 16/10/2008 " id="11809" name="espWatcher Pricing Toolkit" startdate=" 01/08/2003 ">
    <version enddate=" 16/10/2008 " number=" 1" startdate=" 01/08/2003 ">
            <phase color="CCFFCC" currentdate="01/08/2003" name="Project Start" plandate="01/08/2003" type="phase"/>
            <phase color="99CCFF" currentdate="" name="Feasibility Closure" plandate="" type="phase"/>
            <phase color="0099FF" currentdate="15/06/2005" name="Commercialization" plandate="08/12/2004" type="phase"/>
            <phase color="CC99FF" currentdate="16/10/2008" name="Project Closed" plandate="16/10/2008" type="phase"/>
            </version>
    </subproject>
    <subproject enddate=" 31/12/2070 " id="35704" name="espWatcher version 2 (2005)" startdate=" 01/01/2005 ">
    <version enddate=" 31/12/2070 " number=" 1" startdate=" 01/01/2005 ">
            <phase color="CCFFCC" currentdate="01/01/2005" name="Project Start" plandate="01/01/2005" type="phase"/>
            <phase color="99CCFF" currentdate="01/07/2005" name="Feasibility Closure" plandate="01/07/2005" type="phase"/>
            <phase color="0099FF" currentdate="31/03/2006" name="Commercialization" plandate="31/03/2006" type="phase"/>
            <phase color="CC99FF" currentdate="31/12/2070" name="Project Closed" plandate="31/12/2070" type="phase"/>
            </version>
    </subproject>
    </project>
    </program>
    </chart>
    However this solution removes most of the whitespaces, I want exact output as flash file is expecting so..
    Where ever I am calling the CF functions, there I am getting the whitespaces. like below cases.
    startdate="#getProjectStartDate(sProjectIdList)#" -> output I am getting for this statement is -> " 12/09/2009 "
    Please assist me...
    Regards,
    Manoz.

  • White space in XML source code

    Ok, I have tried all of the tricks to prevent white space in the code.  The page displays fine, but there are 4 lines at the top of the source code making the file not vaild.  Ideas?  Thanks in advance.

    You can use the reset attribute of CFCONTENT to clear any output, such as whitespace, that occurs before the CFCONTENT tag.  See quick sample below.  If this doesn't work for you can you post your code?
    <cfsavecontent variable="sampleXml"><?xml version="1.0"?> <!--- no line break or other space between opening cfsavecontent and xml declaration --->
        <people>
            <name>Jon Smith</name>
            <name>Rose Tyler</name>
        </people>
    </cfsavecontent>
    <!--- use reset attribute of cfcontent to clear output above cfcontent tag, do not include any whitespace between close of cfcontent and start of output --->
    <cfcontent type="text/xml" reset="yes" /><cfoutput>#sampleXml#</cfoutput>

  • White space under page

    I created a website with all the page property sizes equal in all pages. My maximun height is of 300px but I have also tried 500px on all pages.
    Website looks great on design mode but when I preview it within Muse or export as html my homepage (page itself not the background) has a long white space I cannot reduced to the content of the page.
    Same thing is happening to 2 different sites I'm building and I have spent over 8 hours looking at forums and trying to debug the problem unsuccessfuly.
    Can somebody provide some support. I'm supposed to deliver this 2 sites by in 4 more days.
    Thank you so much,
    Gloria Segura de Otth
    949-689-0848
    [email protected]

    I have the same problem, and it drives me crazy.  Muse adds extra trapped white space to certain pages in my site, but not all of them.  How about letting us lock the page size so Muse can't add to it?
    Here's a sample.
    Go to kinetta.com, click to enter, and click on the Range tab at the bottom.  That page is longer than all the others.
    I just downloaded Muse 5.0 (Mac) and while the new complex contact form is useful, the second you add to it, and move elements around to make it two columns wide, you can not get rid of the trapped white space where moved elements used to be.  There is a dotted blue line around the area, but it lacks typical resizing squares that other elements have.  However, it determines the size of the window and can not be changed.
    Finally, in the new complex forms, can we have check-boxes or buttons so the user can select certain things and those are reflected into the form that is emailed?
    Thanks.
    [email protected]

  • White spaces in bind variables

    While calling a Report(based on sql with a bind variable) from a Form and passing a value with white space to the bind variable gives the following error:-
    Error: An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
    Also, attempting to translate white spaces is not helpful for bind variable.
    Any help would be appreciated.
    Thanks,
    Gopi.

    Thanks for you replay Reddi,
      Let me explain the scenario: The scenario is RFC --> XI  --> JDBC, one of the element of the FM sometimes could be have the value "      ", when this occurrs in the SXMB_MONI TC I see the value null in the element, that is the tag is <Element />, in this case I need to preserve this white space in the element. The message could be something like this:
    <root>
      <element1>value 1</element1>
      <element2>value 2</element2>
      <element3>      </element3>
    </root> 
    but I see the message in this form:
    <root>
      <element1>value 1</element1>
      <element2>value 2</element2>
      <element3 />
    </root>
    In the message mapping tool I assign the string value "      " and the problem still the same.
      Any Idea?

  • Validating XML and skipping new lines & white spaces ?

    Hi everybody !
    I'm currently developping a new application and the configuration is done within a XML file. My problem is that I'm using IP addresses and so users have to write things like this :
    <agentIP>
    132.137.43.2
    </agentIP>
    and I have a problem with the Java SAX parser : in fact I have declared the type of agentIP in a XML Schema like this :
    <xs:simpleType name="IPAddress">
    <xs:restriction base="xs:string">
    <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
    </xs:restriction>
    </xs:simpleType>
    and the problem is that if there are some white spaces before the IP or some new lines (in fact the user can format this XML file in different manners), I have a parsing error because the parser interprets these characters too.
    Has somebody any idea how to tell the parser to skip these characters ???
    for information here is my source code :
    ErrorHandler errorHandler = new MyErrorHandler();
        content.setLength(0);
        agentTable = new AgentTable();
        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(true);
        SAXParser saxParser = null;
        try {
          saxParser = factory.newSAXParser();
        catch (ParserConfigurationException ex1) {
          ex1.printStackTrace();
        catch (SAXException ex1) {
          ex1.printStackTrace();
        try {
          saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          try {
            saxParser.setProperty(
                "http://java.sun.com/xml/jaxp/properties/schemaSource",
                new org.xml.sax.InputSource(jamap.share.Constants.networkMap));
          catch (SAXNotRecognizedException ex4) {
          catch (SAXNotSupportedException ex4) {
        catch (SAXNotSupportedException ex3) {
          ex3.printStackTrace();
        catch (SAXNotRecognizedException ex3) {
          ex3.printStackTrace();
        org.xml.sax.XMLReader xmlReader = null;
        try {
          xmlReader = saxParser.getXMLReader();
        catch (SAXException ex) {
          ex.printStackTrace();
        xmlReader.setContentHandler(this);
        xmlReader.setErrorHandler(errorHandler);
        //    xmlReader.setProperty(
        //      "http://apache.org/xml/properties/schema/external-schemaLocation",
        //    new File("http://localhost:8080/agentfile.xml"));
        //xmlReader.setErrorHandler (new (ErrorHandler()));
        try {
          xmlReader.parse(new org.xml.sax.InputSource(jamap.share.Constants.homeDir +
                                                      jamap.share.Constants.
                                                      AgentFile));
        catch (SAXException ex2) {
          ex2.printStackTrace();
          System.out.println("Please correct your XML file !");
        catch (IOException ex2) {
          ex2.printStackTrace();
          System.out.println("Error in parsing the agent.xml file");
        return agentTable;
      public void startElement(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String qName,
                               Attributes attributes
                               ) throws
          SAXException {
        if (qName.equals("proxy")) {
          isAgentViaProxy = true;
        content.setLength(0);
      public void characters(char[] chars, int start, int len) throws SAXException {
        content.append(chars, start, len);
      public void ignorableWhitespace(char[] ch,
                                      int start,
                                      int length) throws SAXException {
        System.out.println("Some white spaces were ignored !");
      }and here the XML Schema used:
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:simpleType name="IPAddress">
      <xs:restriction base="xs:string">
        <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
      </xs:restriction>
    </xs:simpleType>
    <xs:element name='networkMap'>
      <xs:complexType>
       <xs:sequence>
         <xs:element ref='agent' minOccurs='0' maxOccurs='unbounded'/>
       </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element name="agent">
      <xs:complexType>
       <xs:sequence>
         <xs:element name="ipAddress" type="IPAddress" minOccurs="1" maxOccurs="1" />
         <xs:element name="proxy" type="IPAddress" minOccurs="0" maxOccurs="1" />
       </xs:sequence>
      </xs:complexType>
    </xs:element>
    </xs:schema>THANK YOU...
    PA

    Hi !
    I've found the solution finally and as nobody wrote me I'll explain it...
    Basically to ignore white spaces you need to specify it within your XML Schema : here is an example of a possible description for an IPv6 address inside an XML schema :
    <xs:simpleType name="IPv6Address">
      <xs:restriction base="xs:string">
       <xs:whiteSpace value="collapse" fixed="true"/>
       <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){7}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
      </xs:restriction>
    </xs:simpleType>as you can see <xs:whiteSpace value="collapse" fixed="true"/> is solving the problem !!
    Bye..
    PA
    http://www.doffoel.com

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • How do I change the color of the background (working) space in Adobe Elements 11 from that awful olive green color to light gray or black or white?

    How do I change the color of the background (working) space in Adobe Elements 11 from that awful olive green color to light gray or black or white?

    Thanks so much for responding! I tried right clicking on the space around the image and nothing happens. No drop down menu appears for me to select a different color! Appreciate your help . . . Diane

  • How to ignore white space when parse xml document using xerces 2.4.0

    When I run the program with the xml given below the following error comes.
    Problem parsing the file.java.lang.NullPointerExceptionjava.lang.NullPointerExce
    ption
    at SchemaTest.main(SchemaTest.java:25)
    ============================================================
    My expectation is "RECEIPT". Pls send me the solution.
    import org.apache.xerces.parsers.DOMParser;
    import org.xml.sax.InputSource;
    import java.io.*;
    import org.xml.sax.ErrorHandler;
    import org.w3c.dom.*;
    public class SchemaTest {
    public static void main (String args[])
    try
    FileInputStream is = new FileInputStream(new File("C:\\ADL\\imsmanifest.xml"));
    InputSource in = new InputSource(is);
    DOMParser parser = new DOMParser();
    //parser.setFeature("http://xml.org/sax/features/validation", false);
    //parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "memory.xsd");
    //ErrorHandler errors = new ErrorHandler();
    //parser.setErrorHandler(errors);
    parser.parse(in);
    Document manifest = parser.getDocument();
    manifest.normalize();
    NodeList nl = manifest.getElementsByTagName("organization");
    System.out.println((((nl.item(0)).getChildNodes()).item(0)).getFirstChild().getNodeValue());
    catch (Exception e)
    System.out.print("Problem parsing the file."+e.toString());
    e.printStackTrace();
    <?xml version = '1.0'?>
    <organizations default="detail">
    <organization identifier="detail" isvisible="true">
    <title>RECEIPT</title>
    <item identifier="S100000" identifierref="R100000" isvisible="true">
    <title>Basic Module</title>
    <item identifier="S100001" identifierref="R100001" isvisible="true">
    <title>Objectives</title>
    <metadata/>
    </item>
    </item>
    <metadata/>
    </organization>
    </organizations>
    Is there a white space problem? How do I get rid from this problem.

    ok now i really wrote the whole code, a bit scrolling in the API is to hard?
                DocumentBuilderFactory dbf = new DocumentBuilderFactory();
                DocumentBuilder db = dbf.newDocumentBuilder();
                dbf.setNamespaceAware(true); //or set false
                Document d = db.parse(inputstream);

  • Importing XML - white spaces before tags

    Hello,
    I'm importing XML into an inDesign document. Everything imports fine but I get extra spaces whenever there is a paragraph return. How could I get rid of those extra white spaces? I don't want to go and edit out all those white spaces by hand....
    Thanks for your help.

    Hello,
    Your issue looks like the one described in this page:
    http://www.xmlplease.com/normalized
    For reference purposes, here is the link for the supported schema and wsdl in PI 7.1
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00a9a425-1769-2a10-9196-bd8eeed72e4c
    As a temporary work around, you can try editing the xsd by removing the spaces before importing it into PI.
    Hope this helps,
    Mark

  • Remove spaces out of XML element

    Hi,
    I have a mapping where i map a flatfile to a xml.
    The incoming element can take a max of  27characters, but most of the time we only get 13 characters. So it has some leading spaces in the xml element, how can i remove those spaces?
    The outcome now looks like:
    <ns0:GTIN>    4260004133753</ns0:GTIN>
    But it should be:
    <ns0:GTIN>4260004133753</ns0:GTIN>

    Hi Ronald,
    For removing leading spaces (as seen in your example) you would use
    String Left Trim Functoid
    Maheshkumar S Tiwari|User Page|Blog|BizTalk
    Server : How Map Works on Port Level

  • Org.xml.sax.SAXParseException: White spaces are required between publicId

    Hi,
    Im migrating an application from weblogic to tomcat 5.5.23 with java 1.5. application involved PDF generation using xalan.jar for transformation. tht pdf generation part is not working in tomcat. Im getting a "org.xml.sax.SAXParseException: White spaces are required between public-Id and system id" error.
    so i replaced the old xalan.jar with latest one ( xalan 2.7.1 ) still no use. I have also explicitly defined the property "javax.xml.transform.TransformerFactory" to "org.apache.xalan.processor.TransformerFactoryImpl" still getting the same exception.
    plz help
    Thanks in Advance.

    I have had good results using JTidy to parse HTML into a DOM.

  • XMl empty node is coming with white space.

    HI Experts,
    In the incoming file my xml element value is 
    <element /> 
    but after reading through code am getting it as 
    <element> </element>
    how can i avoid this issue.

    Whitespace is not significant in XML, so you can trim it away. Once you get the string value of the element, you can call Trim() to remove any trailing whitespace. You can then check the result to see if it is indeed empty:
    var trimmedValue = elementValue.Trim();
    if(string.IsNullOrEmpty(trimmedValue) == true)
    // value is empty
    else
    // value is not empty

Maybe you are looking for

  • Session timeout skillbuilders question

    Application security attributes settings Session Timeout  Maximum Session Length in Seconds   60 On session timeout direct to this URL   <url> Maximum Session Idle Time in Seconds   45 On session idle time timeout direct to this URL   <url> Session t

  • How do i start ipad mobile device services?

    Just connected my Ipad 2 to an HP laptop running Windows 7 Ultimate and getting error msg saying This Ipad cannot be used because Ipad Mobile Service is not started.  How do I start it.  Have not had this problem before I upgraded to IOS 6. Thanks, B

  • The Apps on the second page wont open on my Ipad

    Why wont any apps on my second page open up?

  • Delivery related

    Hi SDNs, Currently my client has been using order related billing for repair orders.now he wants delivery related billing instead of order related billing if i will change the configuration settings from order related to delivery related  billing whe

  • Nokia 2320c-2b freeze and crash help please

    I have a Nokia 2320c-2b and for some reason my phone freezes when I try to delete my text messages or do anything regarding the memory like look at contacts before freezing however it pops up  "Message storage memory not ready" its been like that for