commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terrence Xu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CONFIGURATION-428) The Windows file path cannot be saved correctly as expected in XMLConfiguration
Date Wed, 10 Nov 2010 06:52:22 GMT

     [ https://issues.apache.org/jira/browse/CONFIGURATION-428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Terrence Xu updated CONFIGURATION-428:
--------------------------------------

    Description: 
I want to generate a XML as:
{code:xml}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Test>
    <Cluster>
        <Server location="C:\Server92"/>
    </Cluster>
</Test>
{code}

Java Code:

{code:title=Test.java|borderStyle=solid}
XMLConfiguration config = new XMLConfiguration();
config.setRootElementName("Test");
config.addProperty("Cluster.Server[@location]",  "C:\\Server92");
config.save("C:\\NEW.xml");
{code}

BUT after running the Java Code, the generated XML looks like:
{code:xml}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Test>
<Cluster>
<Server location="C:\\Server92"/>
</Cluster>
</Test>
{code}
You will find that the location is "C:\ \Server92", BUT what I expected is "C:\Server92".

  was:
I want to generate a XML as:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Test>
    <Cluster>
        <Server location="C:\Server92"/>
    </Cluster>
</Test>

Java Code:

XMLConfiguration config = new XMLConfiguration();
config.setRootElementName("Test");
config.addProperty("Cluster.Server[@location]",  "C:\\Server92");
config.save("C:\\NEW.xml");

BUT after running the Java Code, the generated XML looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Test>
<Cluster>
<Server location="C:\\Server92"/>
</Cluster>
</Test>

You will find that the location is "C:\\Server92", BUT what I expected is "C:\Server92".


> The Windows file path cannot be saved correctly as expected in XMLConfiguration
> -------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-428
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-428
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: WIN2K3
>            Reporter: Terrence Xu
>
> I want to generate a XML as:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <Test>
>     <Cluster>
>         <Server location="C:\Server92"/>
>     </Cluster>
> </Test>
> {code}
> Java Code:
> {code:title=Test.java|borderStyle=solid}
> XMLConfiguration config = new XMLConfiguration();
> config.setRootElementName("Test");
> config.addProperty("Cluster.Server[@location]",  "C:\\Server92");
> config.save("C:\\NEW.xml");
> {code}
> BUT after running the Java Code, the generated XML looks like:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <Test>
> <Cluster>
> <Server location="C:\\Server92"/>
> </Cluster>
> </Test>
> {code}
> You will find that the location is "C:\ \Server92", BUT what I expected is "C:\Server92".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message