Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

how to avoid closing up lines

Advisor ,
May 13, 2008 May 13, 2008

Copy link to clipboard

Copied

Hey, this structured stuff is serious fun! and I now have just one challenge left with my first serious xml-to-Frame project: code examples.

In the source, these are tagged as follows, though with the opening [code] tag on a line by itself:

>

sFmisThemeName = "deur"
sFmisTableName = "door_CAD"
' Table name for doors
sFmisTableBid = "building_id"
sFmisTableFid = "floor_char"
sFmisTableID = "ID"
SELECT Bid=sFmisTableBid, F=sFmisTableFid, ID=sFmisTableID, type
FROM sFmisTableName
WHERE sFmisTableBid=sBID
AND sFmisTableFid=sFID


When I open the xml file, the line-breaks have been tidily removed. How can I preserve them?
TOPICS
Structured

Views

482
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 14, 2008 May 14, 2008

Copy link to clipboard

Copied

Hi again,

that's exactly what should happen..xml parser's default behaviour is to replace cr/lf in xml to space.

You can control the behaviour with rw-rule:

element "code" {
reader line break is forced return;
writer line break is forced return;
}

Martti

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 14, 2008 May 14, 2008

Copy link to clipboard

Copied

Niels, congratulations on conquering all challenges! It will be easy from here out :)

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 14, 2008 May 14, 2008

Copy link to clipboard

Copied

LATEST
Thanks, Russ and Martti, for your help and encouragement. Next challenge, tables ... "my" developers are excited by the chance of exporting lots of tabular data as xml.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines