| |

VerySource

 Forgot password?
 Register
Search
View: 617|Reply: 4

_di_iXMLDocument Options

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

Post time: 2020-1-18 00:00:01
| Show all posts |Read mode
I used a _di_iXMLDocument, defined as follows:
_di_iXMLDocument xmlDoc;
xmlDoc = LoadXMLData (...); // ... represents the strings that make up XML.

xmlDoc parses XML, etc., but it is really impossible to set a value for its Options.
E.g:
After xmlDoc-> Options << AttrNull ;, when encountering a non-existent Attribute read in the node, an empty Variant is returned instead of an empty string. Another example:
After xmlDoc-> Options << AutoIndent ;, there is still no automatic indentation or adding placeholders between tags. Observe the value of xmlDoc-> Options, which is '\0' anyway.
Of course, I also tried to assign xmlDoc-> Active = false; to Options afterwards, but still not work.
What's going on, everyone? How can I set the Options value of _di_iXMLDocument? Thank you.
Reply

Use magic Report

0

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-23 13:54:01
| Show all posts
xmlDoc-> Options = xmlDoc-> Options << AttrNull;
or
xmlDoc-> Options = xmlDoc-> Options << AutoIndent;
Reply

Use magic Report

0

Threads

18

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-24 09:36:02
| Show all posts
Agree upstairs
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-26 07:36:02
| Show all posts
Then again, what if I want to remove a parameter from Options? Khan, basic problems.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-29 13:18:01
| Show all posts
xmlDoc-> Options = xmlDoc-> Options >> AutoIndent;
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list